-1

How do i implement a set of keys that have been sent to me by another program , for example (Alt & F4) or any other wanted sequence ? , Thanks in Advance :)

Yaser Jaradeh
  • 322
  • 1
  • 6
  • 27
  • 2
    What kind of application are we speaking about? And is it specifically about "alt + f4", to prevent closing your application? A little bit more details would be very handy to be able to answer your question better (more accurate for what you want). – Styxxy Jun 04 '12 at 21:41
  • also, "implement"? I wonder if the word you are looking for is "scan" or "parse" or "view". Is your application using win forms? wpf? console? other? – payo Jun 04 '12 at 21:57
  • You cannot implement a set of keys but you can implement a method that does something with a set of keys. – Olivier Jacot-Descombes Feb 18 '13 at 17:48
  • @OlivierJacot-Descombes yes you can using SendKeys check my post below – Yaser Jaradeh Feb 18 '13 at 17:52
  • What I said was, that you are using the word "[implement](http://en.wikipedia.org/wiki/Implementation)" in a wrong way. – Olivier Jacot-Descombes Feb 18 '13 at 17:54

1 Answers1

0

Thanks to every one Turned out ,C# makes available a static class to do this:

SendKeys.Send("ABC");

this will send to the top most form ABC and for more keys check this link

http://msdn.microsoft.com/en-us/library/system.windows.forms.sendkeys.send.aspx

Yaser Jaradeh
  • 322
  • 1
  • 6
  • 27