Results 1 to 3 of 3

Thread: Check App

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    May 2000
    Location
    London Occupation: Desktop Developer
    Posts
    141

    Question Check App

    How do I check to see if an application is runnning, if it is I just want to wait until it has completed.

    Thanks

  2. #2
    Matthew Gates
    Guest
    To see if an application is running by knowing it's exe, take a look at this thread.

    Or you can use the FindWindow API function.

    Code:
    Private Declare Function FindWindow Lib "user32" Alias _
    "FindWindowA" (ByVal lpClassName As String, _
    ByVal lpWindowName As String) As Long
    
    
    Private Sub Command1_Click()
    
        Dim hWin As Long
        hWin = FindWindow("SciCalc", "Calculator")
        'FindWindow(class,caption)
        If hWin <> 0 Then
            Msgbox "Window found!", 64, hWin
        Else
            Msgbox "Window not found, 64, hWin
        End If
    
    End Sub

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    May 2000
    Location
    London Occupation: Desktop Developer
    Posts
    141
    Thanks, I presume this is ok on NT?

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