J
Jared Miniman
Seems like a simple scenario: I have a form with a single button. When the
button has focus, and the user presses a hardware key, I want to invoke the
button's onClick. In this baby case, I can just capture the KeyDown on the
one button and manually call the onClick handler with null arguments (since
I can look up in the code and find the button's OnClick delegate name).
However, what if I want to do this across an application with hundreds of
buttons? I have a component that, for each class, when a button has focus
and a specific hardware key is KeyDown'ed on it, I trap that event. Great,
I have the button's properties. I can't click it! I've tried P/Invoking
mouse_event with the button's absolute coordinates, but it merely passes a
WM_LBUTTONDN to the parent window, getting me no where. If I start using
WM_COMMAND, then I assume I need a WindowsCE.Forms.MessageWindow object
sitting inside each form, which I am trying to avoid.
Perhaps the OpenNET folks have come up with something useful in this
department. mouse_event is failing me . . .
button has focus, and the user presses a hardware key, I want to invoke the
button's onClick. In this baby case, I can just capture the KeyDown on the
one button and manually call the onClick handler with null arguments (since
I can look up in the code and find the button's OnClick delegate name).
However, what if I want to do this across an application with hundreds of
buttons? I have a component that, for each class, when a button has focus
and a specific hardware key is KeyDown'ed on it, I trap that event. Great,
I have the button's properties. I can't click it! I've tried P/Invoking
mouse_event with the button's absolute coordinates, but it merely passes a
WM_LBUTTONDN to the parent window, getting me no where. If I start using
WM_COMMAND, then I assume I need a WindowsCE.Forms.MessageWindow object
sitting inside each form, which I am trying to avoid.
Perhaps the OpenNET folks have come up with something useful in this
department. mouse_event is failing me . . .