General discussion

Locked

VB querying another process

By paul.rouse ·
I need VB code that will query to see if another COM application is up and running.

This conversation is currently closed to new comments.

7 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

VB querying another process

by mosborne In reply to VB querying another proce ...

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...

Collapse -

VB querying another process

by paul.rouse In reply to VB querying another proce ...

The question was auto-closed by TechRepublic

Collapse -

VB querying another process

by Result In reply to VB querying another proce ...

If you want to know if the application is running, FindWindow() will probably be your best bet. If you want to detect if the application is responding, here is an MSDN article that may help:

http://support.microsoft.com/support/kb/articles/Q231/8/44.ASP?LNG=ENG&SA=ALLKB&FR=0

Hope it helps!

Collapse -

VB querying another process

by paul.rouse In reply to VB querying another proce ...

The question was auto-closed by TechRepublic

Collapse -

VB querying another process

by Czar Andy In reply to VB querying another proce ...

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

Collapse -

VB querying another process

by paul.rouse In reply to VB querying another proce ...

The question was auto-closed by TechRepublic

Collapse -

VB querying another process

by paul.rouse In reply to VB querying another proce ...

This question was auto closed due to inactivity

Back to Web Development Forum
7 total posts (Page 1 of 1)  

Software Forums