joebenz
asked on
SendKeys
I want to send a Cntrl + O to another application. But SendKeys does not work . Any suggestion?
Thnks
Thnks
Sendkeys sends to the active window so make sure the other application has the focus.
ASKER
To Vinnyd79
I did call SetWindowPos but it's still not working
I did call SetWindowPos but it's still not working
Have you tried using AppActivate to give the app the focus before sending keys to it?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Try to set focus with API function:
Declare Function SetFocusAPI Lib "User" Alias "SetFocus"
(ByVal hwnd As Integer) As Integer
The SetFocus function sets the keyboard focus to the specified window. The window must be associated with the calling thread's message queue.
Declare Function SetFocusAPI Lib "User" Alias "SetFocus"
(ByVal hwnd As Integer) As Integer
The SetFocus function sets the keyboard focus to the specified window. The window must be associated with the calling thread's message queue.
Try to set focus with API function:
Declare Function SetFocusAPI Lib "User" Alias "SetFocus"
(ByVal hwnd As Integer) As Integer
The SetFocus function sets the keyboard focus to the specified window. The window must be associated with the calling thread's message queue.
Declare Function SetFocusAPI Lib "User" Alias "SetFocus"
(ByVal hwnd As Integer) As Integer
The SetFocus function sets the keyboard focus to the specified window. The window must be associated with the calling thread's message queue.
ASKER
I have to go.
See you Monday at 8Am ET
See you Monday at 8Am ET
try the SendMessage function.
ASKER
To jayes
I have tried SendMessage but ...
Give more details about it.
I have tried SendMessage but ...
Give more details about it.
Hi joebenz,
It appears that you have forgotten this question. I will ask Community Support to close it unless you finalize it within 7 days. I will ask a Community Support Moderator to:
Accept guidway's comment(s) as an answer.
joebenz, if you think your question was not answered at all or if you need help, just post a new comment here; Community Support will help you. DO NOT accept this comment as an answer.
EXPERTS: If you disagree with that recommendation, please post an explanatory comment.
==========
DanRollins -- EE database cleanup volunteer
It appears that you have forgotten this question. I will ask Community Support to close it unless you finalize it within 7 days. I will ask a Community Support Moderator to:
Accept guidway's comment(s) as an answer.
joebenz, if you think your question was not answered at all or if you need help, just post a new comment here; Community Support will help you. DO NOT accept this comment as an answer.
EXPERTS: If you disagree with that recommendation, please post an explanatory comment.
==========
DanRollins -- EE database cleanup volunteer
ASKER
Sorry, had forgotten this question