How to know other application running

Now i have to manual to check in Task Manager weather this BIIBER.exe is running or not.
How to use the VB Code to detect the application running or not and is not running we have to automatic to start
the services.
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

If BIIBER.exe is ActiveExe so You can use

Private Function IsRun() As Boolean

On Error Goto ErrHand
Dim o As Object

Set o = GetObject(,"BIIBER.PublicClass")
If o Is Nothing Then
   IsRun = True
End If

Exit Function
End Function

Hope this will help

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
If this helps you, please reject the current answer and select this comment as the answer...

You can try this... In a new project, add a listbox to the form and then add the following code:

    Private Declare Function GetWindow Lib "user32" (ByVal hwnd As Long, ByVal wCmd As Long) As Long
    Private Declare Function GetWindowText Lib "user32" Alias "GetWindowTextA" (ByVal hwnd As Long, ByVal lpString As String, ByVal cch As Long) As Long
    Private Declare Function GetWindowTextLength Lib "user32" Alias "GetWindowTextLengthA" (ByVal hwnd As Long) As Long
    Const GW_CHILD = 5
    Const GW_HWNDFIRST = 0
    Const GW_HWNDLAST = 1
    Const GW_HWNDNEXT = 2
    Const GW_HWNDPREV = 3
    Const GW_OWNER = 4
   Sub LoadTaskList()
      CurrWnd = GetWindow(Form1.hwnd, GW_HWNDFIRST)
      While CurrWnd <> 0
         Length = GetWindowTextLength(CurrWnd)
         ListItem$ = Space$(Length + 1)
         Length = GetWindowText(CurrWnd, ListItem$, Length + 1)
         If Length > 0 Then
            List1.AddItem ListItem$
         End If
         CurrWnd = GetWindow(CurrWnd, GW_HWNDNEXT)
         x = DoEvents()
   End Sub
Private Sub Form_Load()
End Sub

Run the program and all of the running tasks will appear in the listbox... You can modify this code to look for your specific task....

Hope this helps!


kelvin99Author Commented:
Adjusted points to 40
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic Classic

From novice to tech pro — start learning today.