Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

How to execute events in diffrent applications?

stiliyanstiliyan Posts: 1Member
Hi,

I don't know how to execute events ( like key press or mouse move and mouse click ) from my application in diffrent running application.

Please help..

Thanks.

Comments

  • PavlinIIPavlinII Posts: 404Member
    : Hi,
    :
    : I don't know how to execute events ( like key press or mouse move and mouse click ) from my application in diffrent running application.
    :
    : Please help..
    :
    : Thanks.
    :
    Hi,
    you can send the other application to the front and make it active and then use SendKey function to simulate keyboard.
    But better (and little more difficult) way is to send system messages (like KeyPress, mousemove) to the other application.
    If you don't know the PID or hWnd of the other application, try FindWindow API function for this. To send message, use SendMessage API function.

    Hope this helps

    [blue][b][italic][size=4]P[/size]avlin [size=4]II[/italic][/size][/b][/blue]

    [purple]Don't take life too seriously anyway you won't escape alive from it![/purple]


Sign In or Register to comment.