Subclassed Controls and Key Events
Posted: Fri Aug 07, 2009 12:13 pm
by hml >> Tue, 22 Oct 2002 11:00:17 GMT
I have a subclassed control that needs to react to key down event. I have reimplemented the keyDown event on the control class and added the necessary code.
When running thin client, all keys down events are transmitted even if I have used registerFormKeys method on the form listing the codes of the keys I am interested in. The registerFormKeys method doesn't appear to work on the keyDown event if it has been reimplemented on the control classes.
I could remove the key down methods on the controls and on each form the control is added to add an event handler calling methods on the control class, but would rather handle all the events within the control class.
Does anyone know if you can restrict what keys are sent for a control rather than just a form, or even give me a definitive answer that it is not possible?
Torrie Moore
I have a subclassed control that needs to react to key down event. I have reimplemented the keyDown event on the control class and added the necessary code.
When running thin client, all keys down events are transmitted even if I have used registerFormKeys method on the form listing the codes of the keys I am interested in. The registerFormKeys method doesn't appear to work on the keyDown event if it has been reimplemented on the control classes.
I could remove the key down methods on the controls and on each form the control is added to add an event handler calling methods on the control class, but would rather handle all the events within the control class.
Does anyone know if you can restrict what keys are sent for a control rather than just a form, or even give me a definitive answer that it is not possible?
Torrie Moore