Discussion Locked

VB querying another process

0 helpful
7 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
I need VB code that will query to see if another COM application is up and running.

7 replies

by mosborne

One method would be to use the "FindWindow" call in the Win32 API. This is a fairly simple call which searches for an application with a specified title (located in the window caption bar). It will return a windows handle for the window if it exists...

by czar andy

If you do not want to use API, you could make your own function.
Public function FindWindow(WindowName As String) As Boolean
On Error GoTo NotFound
AppActivate WindowName
AppActivate [INSERTYOURAPP'SCAPTIONHERE]
FindWindow = True Exit Function
NotFound:
FindWindow = False
Exit Function

This discussion is closed to new replies.