I have tried to click on the button using the follow:
private const int BN_CLICK = 0xF5;
private const uint WM_LBUTTONDOWN = 0x0201;
private const uint WM_LBUTTONUP = 0x0202;
SendMessage(sendButton, BN_CLICK, IntPtr.Zero, IntPtr.Zero);
SendMessage(sendButton, WM_LBUTTONDOWN, IntPtr.Zero, IntPtr.Zero);
SendMessage(sendButton, WM_LBUTTONUP, IntPtr.Zero, IntPtr.Zero);
All the above fail to click the button, so I was wondering about other alternatives I have or if it is possible to get the button location X and Y from it’s handler ?
Suggestions, ideas would be really good.
After many tests using sendmessage I have resolved trying PostMessage which worked like a charm…
Resolved my problem and sends it on background.