RobertoFreemano
asked on
kill a specific process (IE page) VB.NET 2003
Hi Experts,
My app will open apps 'Outlook', 'Notepad', etc... from WINFORM button.
But I want to open IE page with specific URL, but I also want to kill that specific web-page.
System.Diagnostics.Process .Start("IE xplore.exe ", "http://sample.com/")
'iexplore' is the process, but, if I have more than one IE page open, I don't want to close others.
Thanks,
Roberto
My app will open apps 'Outlook', 'Notepad', etc... from WINFORM button.
But I want to open IE page with specific URL, but I also want to kill that specific web-page.
System.Diagnostics.Process
'iexplore' is the process, but, if I have more than one IE page open, I don't want to close others.
Thanks,
Roberto
Keep track of the Process IDs (PIDs) so you can shut down the right IE process.
Sample Code
1. Start notepad
System.Diagnostics.Process .Start("no tepad")
2. Start winword
System.Diagnostics.Process .Start("WI NWORD")
3. Start excel
System.Diagnostics.Process .Start("Ex cel")
4. Start ie and parameter
System.Diagnostics.Process .Start("IE xplore.exe ", "http://vbnetsample.blogspot.com/")
5. Kill It!!
' Kill all notepad process
Dim pProcess() As Process = System.Diagnostics.Process .GetProces sesByName( "notepad")
For Each p As Process In pProcess
p.Kill()
Next
1. Start notepad
System.Diagnostics.Process
2. Start winword
System.Diagnostics.Process
3. Start excel
System.Diagnostics.Process
4. Start ie and parameter
System.Diagnostics.Process
5. Kill It!!
' Kill all notepad process
Dim pProcess() As Process = System.Diagnostics.Process
For Each p As Process In pProcess
p.Kill()
Next
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Magic ;)