Jacek Koralik
Jacek Koralik

Reputation: 1795

Emulate keyboard

How can I emulate keyboard in application running in background (hidden in tray). I want to press, hold, and relase keys on keyboard programatically. Also, I would like to move mouse around and be able to click.

Upvotes: 5

Views: 8079

Answers (2)

ChrisG
ChrisG

Reputation: 314

You can also try the Windows.Forms.SendKeys API

Here is a How-To: How to: Simulate Mouse and Keyboard Events in Code

Upvotes: 1

Rajeev
Rajeev

Reputation: 4849

You can use SendInput API function

Upvotes: 4

Related Questions