The goal is to send the Q key press to an invisible process (that does not have focus) : I know the process ID.
I know how to send keys to a visible application. Can this be done to an hidden application ?
The goal is to send the Q key press to an invisible process (that does not have focus) : I know the process ID.
I know how to send keys to a visible application. Can this be done to an hidden application ?
I assume, that your invisible process has a window, which just happen to be invisible (it could for example have been hidden through a call to ShowWindow with SW_HIDE als parameter) and that you want to send keystrokes using SendMessage/PostMessage.
I would suggest to try the following:
A hidden window should be able to receive keystokes as good as a visible window and most application probably don't check if they are really visible before reacting, so that there are good chances that it works.