Results 1 to 4 of 4

Thread: I NEED HELP.... Detect if program is running

  1. #1

    Thread Starter
    Member
    Join Date
    Nov 2001
    Location
    Heaven........ Whats that fire doing here?
    Posts
    39

    Question I NEED HELP.... Detect if program is running

    I need help.... i have this program running in the background

    program.hide

    ok... so im trying to detect.... if C:\windows\desktop\kazaa.exe
    is started or running, then i want checkfrm to appear with a password thing, i can do the password thing but i need to know how to do the rest, and if the password is wrong then I want it to shut the kazaa program down... thank you so much.... i am soooo stumped... thanks

    I dont know where to put this... in a timer mabey?

    If Shell "C:\windows\desktop\kazaa.exe" Then
    Shell "C:\windows\desktop\checkfrm.frm"
    End If


    please help

  2. #2
    Addicted Member Osiris's Avatar
    Join Date
    Oct 2000
    Location
    Dimension Hole
    Posts
    142
    spyplayer,

    are you trying to put password protection on the program??
    try using API -- > Findwindow("class", vbNullString) but you'll
    need a Handle Spy

    X = Findwindow("class", vbNullString)
    if X = 0 Then Call Sendmessage(X, WM_Close, 0, 0)

    yeah, and you would have to put it in a timer
    ؊Ϯϊ

  3. #3
    Addicted Member Osiris's Avatar
    Join Date
    Oct 2000
    Location
    Dimension Hole
    Posts
    142
    errr,

    meant to put
    if X > 0 Then Call Sendmessage(X, WM_Close, 0, 0)
    ؊Ϯϊ

  4. #4
    Zaei
    Guest
    You can use FindWindow to check the title bar as well. Call X = FindWindow(vbNullString, "<titlebar caption>").

    Also, check that X <> 0, because since a Long is signed (both positive and negative values), the Window handle MIGHT wrap around, and become negative.

    Z.

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