|
-
Apr 30th, 2001, 02:44 PM
#6
SetFocus (or PutFocus, as Matt renamed it) can only be used to set the focus to windows within your program. You can't use it to set focus to another program. This makes it useless for you.
There is another API function, SetForegroundWindow, but this is probably also useless, because later versions of windows don't let you use it to bring a window to the foreground unless your program is in the foreground. There is a workaround, though. You can find it if you go to this site and look for ForceFore.zip:
http://www.mvps.org/vb/index2.html?samples.htm
Here's the declaration for SetForegroundWindow in case you might want it:
Private Declare Function SetForegroundWindow Lib "user32" Alias "SetForegroundWindow" (ByVal hwnd As Long) 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
|