WonHop
asked on
Setting Focus On A VB App
I have a VB app that goes thru and make certain checks. This can sometimes take about 3-4 minutes. When the checks are completed, a Message Box pops up giving the results of the check.
What I need is, if while the checking process is going on, someone, lets say opens Microsoft Word to do some work in it.
When the checking process is complete, I need to the VB app to become Visible again and setfocus on it.
I need for it to take over the screen again right before the Message Box pops up.
The name of my app is Search.exe
Thanks
WonHop
What I need is, if while the checking process is going on, someone, lets say opens Microsoft Word to do some work in it.
When the checking process is complete, I need to the VB app to become Visible again and setfocus on it.
I need for it to take over the screen again right before the Message Box pops up.
The name of my app is Search.exe
Thanks
WonHop
optionally,
Private Declare Function ShowWindow Lib "user32" Alias "ShowWindow" (ByVal hwnd As Long, ByVal nCmdShow As Long) As Long
Private Const SW_RESTORE = 9
'usage
showwindow me.hwnd, SW_RESTORE
Private Declare Function ShowWindow Lib "user32" Alias "ShowWindow" (ByVal hwnd As Long, ByVal nCmdShow As Long) As Long
Private Const SW_RESTORE = 9
'usage
showwindow me.hwnd, SW_RESTORE
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Hello Guys. Thanks for the reply. Sorry I am just now getting back to you, but I did not receive and still have not received any emails saying anyone replied and I left early Friday. I guess I should have checked anyway like I did today.
I will check these out and see how they work.
Thanks
WonHop
I will check these out and see how they work.
Thanks
WonHop
ASKER
Hello guys. For the app I was running, ameba's comment was the one that worked.
Thanks to you all
WonHop
Thanks to you all
WonHop
Thanks!
appactivate currentform.name like :
AppActivate Me.Name