jrrandle
asked on
Problem with BM_CLICK
Hello experts!
I am having problems clicking a button in another application. I have tried using SendMessage, and even though i see the message arrive at the button in Spy++, it does not respond?!
Thankyou in advance,
James.
I am having problems clicking a button in another application. I have tried using SendMessage, and even though i see the message arrive at the button in Spy++, it does not respond?!
Thankyou in advance,
James.
ASKER
Idle Mind,
Thanks for your reply. That still doesn't work, and it's definitely a button (WindowsForms10.BUTTON.app 3). I have observed all the messages sent to the button when i actually click it, and even replicated them (to the letter) but the application refuses to accept the click.
Interestingly, that code does work on a non .NET app? and also on a textbox in the same app, just not on the button... :o(
Do you have any other ideas?
Cheers again,
James.
Thanks for your reply. That still doesn't work, and it's definitely a button (WindowsForms10.BUTTON.app
Interestingly, that code does work on a non .NET app? and also on a textbox in the same app, just not on the button... :o(
Do you have any other ideas?
Cheers again,
James.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Idle,
It is now working?! Weird. BM_CLICK doesn't work, but LBUTTONDOWN LBUTTONUP works if i put a small delay in (100ms).
The points are yours - thanks for your help,
James.
It is now working?! Weird. BM_CLICK doesn't work, but LBUTTONDOWN LBUTTONUP works if i put a small delay in (100ms).
The points are yours - thanks for your help,
James.
You could try sending WM_LBUTTONDOWN followed by WM_LBUTTONUP.
private const UInt32 WM_LBUTTONDOWN = 0x201;
private const UInt32 WM_LBUTTONUP = 0x202;