If "example.exe" is running on process to be notified...

Posted on 2006-05-26
Last Modified: 2010-04-30
hello experts!!

I want to know if is possible to .. if the application  name "example.exe" is running on task manager process to be notified ..
Question by:KingSencat
    LVL 2

    Accepted Solution

    There's an example at which does exactly what you want - you could call the code using a timer and take whatever action you want when you find the task running.
    LVL 35

    Expert Comment

    by:[ fanpages ]
    Here's a PAQ I have contributed to...

    "Check application is running or not"
    [ ]

    Dim blnRunning As Boolean
    Dim objProcess As Object

    blnRunning = False

    For Each objProcess In GetObject("winmgmts:").ExecQuery("select * from Win32_Process")
        If LCase(objProcess.Name) = "example.exe" Then
           blnRunning = True
           Exit For
        End If
    Next objProcess

    If (blnRunning) Then
       MsgBox "example.exe is running..."
    End If


    LVL 35

    Expert Comment

    by:[ fanpages ]
    PS. This PAQ (again, that I contributed to) may also be useful to you:

    "Calling Task Manager from within Excel"
    [ ]



    Author Comment

    the source is work but first i must to open the "example" and then i must to open the  vb6 applicatoion to can alert me that i have that proccess open .. if i open the vb6 application running and then i open the "Example.exe" it will not warn me .

    Featured Post

    Looking for New Ways to Advertise?

    Engage with tech pros in our community with native advertising, as a Vendor Expert, and more.

    Join & Write a Comment

    Suggested Solutions

    When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
    Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
    As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
    Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…

    731 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    19 Experts available now in Live!

    Get 1:1 Help Now