VB sendkey is not working if focus is lost

hi,

                    My question is about VB "sendkeys". Its working properly if focus remains in the application. But if focus is lost (say a dialog box has been appeared on the screen ". how can I handle the problem.

thanks.
dotcdotc
dotcdotcAsked:
Who is Participating?
 
Richie_SimonettiConnect With a Mentor IT OperationsCommented:
If you really needs to send key to a non-focus app, use SendMessage  or Keyboard_event APIs.
Cheers
0
 
Mikal613Commented:
Use the Function AppActivate which you just pass the name of the app.
0
 
Richie_SimonettiIT OperationsCommented:
AppActivate works if there is no dialog box that belongs to target appliaction in screen cause when you use AppActivate, VB activates the foremost window.
0
 
Richie_SimonettiIT OperationsCommented:
Ups!, where is the split thing?
0
All Courses

From novice to tech pro — start learning today.