M
milund
Hi,
I am in the process of writing a custom control. In the OnMouseDown
method I call this.Focus() to enable the control to receive keystrokes
in OnKeyDown(). My control is hosted in a MDI form.
Originally my control inherited from UserControl, but then the call to
this.Focus() returned false and no keypresses were received. The I
changed it to inherit from Control and everything works as expected.
Why doesn't it work when I inherit from UserControl?
thanks,
Michael
I am in the process of writing a custom control. In the OnMouseDown
method I call this.Focus() to enable the control to receive keystrokes
in OnKeyDown(). My control is hosted in a MDI form.
Originally my control inherited from UserControl, but then the call to
this.Focus() returned false and no keypresses were received. The I
changed it to inherit from Control and everything works as expected.
Why doesn't it work when I inherit from UserControl?
thanks,
Michael