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
Printable View
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
Do a quick search for
VB6 SetTopMost API
Shoudl give you some matches with sample code.
Other APIs to consider would be SetWindowPos and BringWindowToFront
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