|
-
May 11th, 2007, 01:06 AM
#1
Thread Starter
Junior Member
-
May 11th, 2007, 03:53 AM
#2
Lively Member
Re: Program List Help
There is a way to check if an application is running, but you would need to use an API to do it. I have used them in the past, but can't find the projects that I used them in, try asking in the API forums.
If, somehow, I help you, please rate the post using the scales icon in the left bar <----  .
Please Use Naming Conventions in your projects! ------\/
http://www.visibleprogress.com/vb_na...onventions.htm
Me to Brother
-Hey, look at this avater I made in about 5 seconds
-What, morrisons?
-AGHHHHHH
-
May 11th, 2007, 03:56 AM
#3
Lively Member
Re: Program List Help
Hang on, this one looks useful:
Code:
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Private Sub Form_Load()
hWindow = FindWindow(vbNullString, "Notepad")
If IsWindow(hWindow) = 1 Then 'Code for if program is running.
End Sub
This requires a hardwired in set of apps though, there is an API for checking processes, which you could compare to a list of processes that you stored in a .TXT file for a more efficient and flexible solution.
If, somehow, I help you, please rate the post using the scales icon in the left bar <----  .
Please Use Naming Conventions in your projects! ------\/
http://www.visibleprogress.com/vb_na...onventions.htm
Me to Brother
-Hey, look at this avater I made in about 5 seconds
-What, morrisons?
-AGHHHHHH
-
May 11th, 2007, 04:01 AM
#4
Re: Program List Help
Don't forget to declare hWindow 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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|