how to read taskMgr/Proccess to see if an app is running?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello,

I need to determine if a VB2005 app is running, but I need to determine this
from another VB2005 app. Back in the com days there were various API's to do
this

apiGetClassName
apiGetWindow
apiGetWindowLong

How to do this from VB2005?

Thanks,
Rich
 
Take a look at this:
Same principal, just dont kill the process :-)

Private Sub KillExcel()

Dim myProcesses As Process
Dim myProcess As Process

myProcesses = Process.GetProcessesByName("EXCEL.EXE")
For Each myProcess In myProcesses
myProcess.Kill()
Next

'These next two lines are not needed as teh sub ends right after.
myProcesses = Nothing
myProcess = Nothing

End Sub

Miro
 
Back
Top