|
-
Sep 13th, 2002, 01:41 PM
#1
Thread Starter
Hyperactive Member
Get Hwnd by filename?
Is there a set of API's I can use where I can specify the name of the executable (say "C:\Program Files\MyApp.exe"), and retrieve handles to a window of that app?
And I, for one, welcome our new insect overlords. I'd like to remind them as a trusted TV personality, I can be helpful in rounding up others to toil in their underground sugar caves.
-
Sep 13th, 2002, 01:56 PM
#2
Thread Starter
Hyperactive Member
Maybe I should better explain what I'm looking for.
The program C:\MyApp.exe is going to be running, but hidden with a icon in the systray.
I want my other program to be able to signal to the running instance of MyApp.exe that it should show itself.
Is there a way to do this when I only know the path to the file?
I know FindExecutable returns a handle to a file but I don't know if that's useful..
And I, for one, welcome our new insect overlords. I'd like to remind them as a trusted TV personality, I can be helpful in rounding up others to toil in their underground sugar caves.
-
Sep 14th, 2002, 12:52 AM
#3
Hyperactive Member
[vbcode]
' comment
Rem remark
[/vbcode]
-
Sep 14th, 2002, 07:54 AM
#4
Thread Starter
Hyperactive Member
Right, but what can I do with that handle that's returned?
And I, for one, welcome our new insect overlords. I'd like to remind them as a trusted TV personality, I can be helpful in rounding up others to toil in their underground sugar caves.
-
Sep 14th, 2002, 10:43 AM
#5
Hyperactive Member
Try this:
VB Code:
Private Declare Function ShowWindow Lib "user32" (ByVal hwnd As Long, ByVal nCmdShow As Long) As Long
Private Const SW_SHOWNORMAL = 1
'usage
ShowWindow HandleOfFile&, SW_SHOWNORMAL
[vbcode]
' comment
Rem remark
[/vbcode]
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
|