|
-
Nov 14th, 2002, 03:16 PM
#1
Thread Starter
Member
How can i tell if a program is running and is it in if..then...else
need to be able to tell if the login program is running. and then is it in an if then else statement
Last edited by wildcard; Nov 14th, 2002 at 03:21 PM.
-
Nov 14th, 2002, 03:25 PM
#2
PowerPoster
I am not sure how you can tell which part of the code a pp is executing, ut you can find if a pp is running if you know the window caption. Use the FindWindow api call to determine if that particular application is currently running or not.
-
Nov 14th, 2002, 03:30 PM
#3
Thread Starter
Member
uh whats the full call?
my api viewer is nowhere to be found
-
Nov 14th, 2002, 03:47 PM
#4
PowerPoster
VB Code:
'api call
Private Declare Function FindWindow Lib "user32" _
Alias "FindWindowA" (ByVal lpClassName As String, _
ByVal lpWindowCaption As String) As Long
'code
Dim lngHwnd As Long
lngHwnd = FindWindow(vbNullString, "<your window caption>")
If lngHwnd > 0 Then MsgBox "Window found"
-
Nov 14th, 2002, 03:48 PM
#5
Thread Starter
Member
-
Nov 14th, 2002, 03:51 PM
#6
Hyperactive Member
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|