Results 1 to 3 of 3

Thread: Checking if another application is running

  1. #1
    [T3]bill
    Guest

    Smile Checking if another application is running

    Is there a way to check and see if another program is running?
    I want to be able to see if Excel is running and if it is use the instance already open instead of making another.

  2. #2
    Megatron
    Guest
    VB Code:
    1. Private Declare Function FindWindowEx Lib "user32" Alias "FindWindowExA" (ByVal hWnd1 As Long, ByVal hWnd2 As Long, ByVal lpsz1 As String, ByVal lpsz2 As String) As Long
    2.  
    3. Private Sub Command1_Click()
    4.     Dim hExcel As Long
    5.     hExcel = FindWindowEx(0, 0, "XLMAIN", vbNullString)
    6.     If hExcel <> 0 Then MsgBox "Excel is running"
    7. End Sub

  3. #3
    Junior Member
    Join Date
    Sep 2000
    Location
    Calgary, Albetra, Canada
    Posts
    19
    Okay ... this is all good, butwhat if the app you are looking for is one you have created ex: mls_interface.exe ... how would I check to see if this application is currently running?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width