Results 1 to 7 of 7

Thread: I'm Trying to Code something that tells whether a certain other app is running

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Mar 2000
    Posts
    19
    I'm Trying to Code something that tells whether a certain other app is running (not mine) and i have no idea what classname is, if anyone can give me some idea or working code please do so

  2. #2
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    What app are you talking about? Is the problem that you don't know the classname or do you want the code to find the app (that needs the classname), or Both?

  3. #3
    New Member
    Join Date
    Mar 2000
    Posts
    1
    If you know the window caption of the app then just use FindWindow to establish if it is running.

  4. #4

    Thread Starter
    Junior Member
    Join Date
    Mar 2000
    Posts
    19

    I need the code or a really good explaination please

    and I'm looking to check if the window is there i dont have any clue what classnames are tho

  5. #5
    Fanatic Member
    Join Date
    Jan 2000
    Location
    Nitro
    Posts
    633
    Do this my friend!

    Hit Control-Alter-Delete and check for the name of the application you closing.

    Go back into your codes and use the function

    On Error Resume Next
    AppActivate "Program Name"

    If err.number <>0 then ?????

    If it returns an error that means the application is not open.


    See Ya
    Chemically Formulated As:
    Dr. Nitro

  6. #6
    Lively Member
    Join Date
    May 1999
    Location
    India
    Posts
    97
    Hi there...
    Well mate, Nitro is pretty much ontrack.. However it may NOT work if the App is already activated.. that is if the app in questions window is the top level window.. then u may have a problem... so we're back to kedaman's question what exactly is your problem?? not knowing the class name or do u want code??

    Cheers
    [email protected]
    " Programming today is a race between software-engineers striving to build bigger and
    better idiot-proof programs and the universe trying to produce bigger and better idiots.
    So far the universe is winning".
    :-)

  7. #7
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    So much hullabaloo for nothing- Use these to get the active windows classname:

    Declare Function GetForegroundWindow Lib "user32" () As Long
    Declare Function GetClassName Lib "user32" Alias "GetClassNameA" (ByVal hwnd As Long, ByVal lpClassName As String, ByVal nMaxCount As Long) As Long

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