View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Peter T Peter T is offline
external usenet poster
 
Posts: 5,600
Default question about FindWindow API call

I can't imagine why it would not be a fast and reliable way to determine if
an app is open, providing you know it's window class name. FWIW much faster
than say GetObject (assuming that works with the app in question).

Function IsWordRunning() As Long
Dim hWin As Long
Const WORD_CLASSNAME As String = "OpusApp"
hWin = FindWindow(WORD_CLASSNAME, vbNullString)

IsWordRunning = hWin
End Function

However you can make your own TaskList with the following
http://support.microsoft.com/kb/q187913/

Regards,
Peter T




"xlrotor" wrote in message
...
Is FindWindow a reliable way to determine if a particular application
is currently running?

I had been using Tasklist.exe to do this, but this program does not
appear to be present on Windows XP Home systems.

Thanks