locked
How to send a mouse click message to a button in the window when the window is hidden or minimized RRS feed

  • Question

  • Write a tool to automatically operate the third party software. There is a button in the software window. I need to send messages to click, and the software will hide the window after it is minimized, and then there is an icon under the tray.

    If I don't minimize, I can using SendMessage(msg type is BM_CLICK) to send mouse click messages and trigge the button event.

    But if it is minimized can't be triggered the button click event. Is there any way to send mouse click messages to the button in case of minimization or form hiding?
    Thursday, March 29, 2018 1:47 AM

All replies

  • Hello Jeff,

    It's impossible to send mouse click messages to button when windows minimize or hide. The click message is only consumed by the window whose z-position is most top. As your referring, you want to operate buttons in third party software. It means that you can't change code to interprocess communications.

    Best Regards,

    Neil Hu


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Wednesday, April 4, 2018 7:40 AM