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

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
 
M

Miro

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top