|
-
Jan 4th, 2002, 07:23 AM
#1
Thread Starter
New Member
App Running - Closing Objects
2 part Question
Is there an easy way to determine is a particular app is running. I wish for some options to change in my dll depending if certain apps are running.
Secondly, Is it possible to list objects that are currently running and then being able to close selected ones. For example I use vbscript to create 3 different objects from my dll. Is it possible to release the objects fully. (Set obj1 = Nothing) doesn't always work.
If I create 3 objects:
Eg Set Obj1 = CreateObject("mydll.class1")
Set obj2 = CreateObject("mydll.class2)
set obj3 = CreateObject("mydll.class3)
Then be able to list obj1, obj2, obj3 etc
and then be able to kill obj2 or kill all instance and links to mydll
-
Jan 4th, 2002, 07:31 AM
#2
Feed this the caption of the application you are looking for.
VB Code:
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Private Sub Command1_Click()
Dim WinWnd As Long
WinWnd = FindWindow(vbNullString, "Calculator")
If WinWnd = 0 Then
MsgBox "Calculator Not Running"
Else
MsgBox "Calculator Is Running"
End If
End Sub
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
|