I have a program that start with a window with a "start" button: I want to create a little program that "clic" (virtually) this start button or send a "enter" keystroke. Can anybody help me?
You could send application B a message from application A telling application B a keystroke was received in application A. You don't need to send the actual stroke but just a message.
Check out SetWindowsHookEX() in MSDN. The SetWindowsHookEx function installs an application-defined hook procedure into a hook chain. You would install a hook procedure to monitor the system for certain types of events. These events are associated either with a specific thread or with all threads in the system. Never used it but I've read about it. I think you'll want to set a WH_GETMESSAGE hook. It installs a hook procedure that monitors messages posted to a message queue. One app posts the message and the other read it.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.