-
August 19th, 2012, 11:24 PM
#1
How do you bring a window to the front
How do you bring a vb6 window to the front of all other program windows that are open eg IE, Word not just the vb6 windows? I have tried Show and SetFocus
Thanks, Steve
-
August 20th, 2012, 12:06 AM
#2
Re: How do you bring a window to the front
Do a quick search for
VB6 SetTopMost API
Shoudl give you some matches with sample code.
Always use [code][/code] tags when posting code.
-
August 20th, 2012, 02:26 AM
#3
Re: How do you bring a window to the front
Other APIs to consider would be SetWindowPos and BringWindowToFront
-
September 6th, 2012, 07:48 AM
#4
Re: How do you bring a window to the front
If your window does not contain A SetFocus Method you should use win32api
There are several methods (depending on what you like):
Private Declare Function BringWindowToTop Lib "user32.dll" (ByVal hwnd As Long) As Long
Private Declare Function SetFocus Lib "user32.dll" (ByVal hwnd As Long) As Long
Private Declare Function SetWindowPos Lib "user32.dll" (ByVal hwnd As Long, ByVal hWndInsertAfter As Long, ByVal x As Long, ByVal y As Long, ByVal cx As Long, ByVal cy As Long, ByVal wFlags As Long) As Long
Private Declare Function ShowWindow Lib "user32.dll" (ByVal hwnd As Long, ByVal nCmdShow 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
|