Inside the application there is an if statement. It checks a string variable kai if the variable equals to 1 i want it to react as if i pressed the right arrow on my keyboard. Can you help me with that? Thanks.
Asked
Active
Viewed 529 times
2 Answers
1
Actually you might want to think about using Commands for that. If you think about what you want to achieve it is to trigger something after the Key-Press. If you use a Command for that you can directly trigger it without going via the programmatic key pressing stuff. Also you can still trigger the command via a keypress (InputGesture).
You can find out more about Commands here: http://msdn.microsoft.com/en-us/library/system.windows.input.icommand.aspx

Gope
- 1,672
- 1
- 13
- 19
0
maybe like this:
SendKey.Send({rigth});
set focus to the control you want to input before. And you ave to declare
Using System.Windows.Form

CB.
- 58,865
- 9
- 159
- 159
-
What if i want to set focus to another active application? Any tips there? – Kwstas Nov 08 '11 at 07:14