BM_CLICK (Constants)
Last changed: 212.44.26.236

.

        /// <summary>
        /// This message is sent by an application to simulate the user clicking a button. This message causes the button to receive a WM_LBUTTONDOWN and a WM_LBUTTONUP message, and the button's parent window to receive a BN_CLICKED message.
        /// </summary>
        BM_CLICK = 0x00F5

Example

// buttonWindowHandle - handle of Button window

SendMessage(buttonWindowHandle, BM_CLICK, (IntPtr)0, (IntPtr)0);