8
Answers

Capture KeyPress events in a game

Photo of Venkatesh V

Venkatesh V

14y
2.1k
1
Hello all,

I am a beginner in C# and am currently writing a small program. This program would launch a game and wait in the back ground till the game is closed. While the game is running, the application has to perform certain functions whenever a specific key(F11) is pressed.

I am not able to figure out a way in which i could capture the keystroke when the game is running. I also want to find out how I can get the game resolution whenever F11 is hit. Could someone help me. 

Thanks in advance.

Answers (8)

0
Photo of Upendra Pratap Shahi
NA 13.3k 861.7k 9y
http://www.c-sharpcorner.com/UploadFile/40e97e/send-keys-to-application-programmatically-using-C-Sharp/


http://www.vbforums.com/showthread.php?621803-Sendkey-to-webbrowser

If helpful marked as Accepted Answer
0
Photo of Upendra Pratap Shahi
NA 13.3k 861.7k 9y
http://www.c-sharpcorner.com/UploadFile/40e97e/send-keys-to-application-programmatically-using-C-Sharp/


http://www.vbforums.com/showthread.php?621803-Sendkey-to-webbrowser

If helpful marked as Accepted Answer
0
Photo of Dipankar Biswas
NA 3k 125.6k 9y
hi..
 
it may help u..
 
Thanks..