Home All Groups Group Topic Archive Search About
Author
16 Apr 2005 3:15 AM
Husam
Hi EveryBody:

As you know we can start process by using:

System.dignostics.process.start("ProcessName")

But my question is How can I stop running process ?

Any help will be appreciated

regard's

Husam

Author
16 Apr 2005 3:46 AM
Crouchie1998
Try this:

' Import
Imports System.Diagnostics

Dim p As Process

Dim pr As Process

pr = p.Start("Notepad")

MessageBox.Show("Notepad Started")

If Not (pr Is Nothing) Then

    pr.Kill()

End If

Crouchie1998
BA (HONS) MCP MCSE
Author
16 Apr 2005 11:07 AM
Herfried K. Wagner [MVP]
"Crouchie1998" <crouchie1998@spamcop.net> schrieb:
>pr = p.Start("Notepad")
>[...]
>    pr.Kill()

I suggest to use 'CloseMainWindow' instead of 'Kill' for Windows
applications.

--
M S   Herfried K. Wagner
M V P  <URL:http://dotnet.mvps.org/>
V B   <URL:http://classicvb.org/petition/>