RSS Forums RSS
Please support our C# advertiser: Programming Forums
Views: 632 | Replies: 2 | Thread Tools  Display Modes
Reply
Join Date: Jan 2008
Posts: 18
Reputation: mark192 is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 0
mark192 mark192 is offline Offline
Newbie Poster

Help with sending a keystroke to an application?

  #1  
Aug 21st, 2008
What I'm trying to do is for example, click a button on the program and have the program send a keystroke to another program that is not the active window. So far all I have is this

SendKeys.Send("TEST");

This works fine if the program I want to send the keystrokes to is the active window, however I want to be able to send it to a non active window does anyone have any recommendations?

Thanks
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Aug 2008
Posts: 1,289
Reputation: LizR will become famous soon enough LizR will become famous soon enough 
Rep Power: 4
Solved Threads: 128
LizR LizR is offline Offline
Nearly a Posting Virtuoso

Re: Help with sending a keystroke to an application?

  #2  
Aug 21st, 2008
SendKeys sends to the active application so, if the app you want to send to is focused it should be sending to it.
Reply With Quote  
Join Date: Jan 2008
Posts: 18
Reputation: mark192 is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 0
mark192 mark192 is offline Offline
Newbie Poster

Re: Help with sending a keystroke to an application?

  #3  
Aug 21st, 2008
Originally Posted by LizR View Post
SendKeys sends to the active application so, if the app you want to send to is focused it should be sending to it.


and it does, I guess I'm looking for a way to quickly switch the active window from

current active window --> target window --> back to "current active window"
Last edited by mark192 : Aug 21st, 2008 at 3:37 am. Reason: typo
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.



Other Threads in the C# Forum
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes
Forums | Blogs | Tutorials | Code Snippets | Whitepapers | RSS Feeds | Advertising
All times are GMT -4. The time now is 7:57 pm.
Newsletter Archive - Sitemap - Privacy Statement - Acceptable Use Policy - Contact Us
Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC