Can't get focus on user control
Hi all,
I'm trying to write a text editor for a mobile device that can support different coloured text.
So far everything is going well, but the form won't accept the keydown event, i.e. its never fired (the breakpoint is never reached)
Whenever the user clicks the mouse on the control I use the following code:
if(this.CanFocus)
if(!this.Focus())
MessageBox.Show("No Focus");
It always brings up the message box. It must be able to get focus though. Does anyone know why it won't get focus.
Cheers
DRB2k2
|