|
-
May 7th, 2001, 11:21 AM
#1
You can use FindWindow as in this code to check if a program (with window caption "XYZ") is already loaded. If it is it swaps focus to that instance and then ends. You also have to declare functions for ShowWindow and BringWindowToTop
Dim rval As Long
Dim findhwnd As Long
Dim strNull As String
findhwnd = FindWindow(strNull, "XYZ")
If findhwnd <> 0 Then
rval = ShowWindow(findhwnd, 1)
rval = BringWindowToTop(findhwnd)
End
End If
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
|