General discussion

  • Creator
    Topic
  • #2080084

    VB querying another process

    Locked

    by paul.rouse ·

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

All Comments

  • Author
    Replies
    • #3901894

      VB querying another process

      by mosborne ·

      In reply to VB querying another process

      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…

    • #3898556

      VB querying another process

      by result ·

      In reply to VB querying another process

      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!

    • #3901547

      VB querying another process

      by czar andy ·

      In reply to VB querying another process

      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

    • #3792334

      VB querying another process

      by paul.rouse ·

      In reply to VB querying another process

      This question was auto closed due to inactivity

Viewing 3 reply threads