Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Is there a way to send keys to a program w/o activating the Window 2

Status
Not open for further replies.

sunila7

Technical User
Apr 11, 2001
1,087
US
Is there a way to send keys to a program w/o activating the Window? Without using AppActivate and sendkeys? the problem with this is that the window keeps getting focus everytime appactivate is called. Is there a way to avoid that?

Thanks

Sunil

Sunil
 
That's what AppActivate does -- it gives the other application focus, in order that you can then do a SendKeys to it.

Chip H.


If you want to get the best response to a question, please check out FAQ222-2244 first
 
Hi Chiph,

Thanks for the response. I wanted to know whether it is possible to send a text to a window from another application without activating it. I think snedkeys will not do it bcos the window has to be activated for it to work.

Sunil
 
Look into the sendmessage api. I believe you can send info to another running application without activating the window. You should be able to find tutorials if you search it on any search engine.

k2w
 
Hi sunila7

You can use SendMessage API function to send data from one app to another.
 
sunila7,

Check out DDE (Dynamic Data Exchange) conversation in VB help. There are a bunch of Link... methods, events, and properties that do the job. Not sure if Microsoft still wants us utilize DDE technique.


Vladk
 
Thanks guys for the info. will look into and post back if I get to the solution :)

Sunil
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top