I am starting a process from a Windows application. When I press a button I want to simulate the pressing of key F4 in that process. How can I do that?
[Later edit] I don’t want to simulate the pressing of the F4 key in my form, but in the process I started.
To send the F4 key to another process you will have to activate that process
http://bytes.com/groups/net-c/230693-activate-other-process suggests:
You may then be able to use System.Windows.Forms.SendKeys.Send(“{F4}”) as Reed suggested to send the keystrokes to this process
EDIT:
The code example below runs notepad and sends “ABC” to it: