Focus on textbox

  • Thread starter Thread starter tdj
  • Start date Start date
T

tdj

Hi,

I'm working on a project with .NET CF and after some ups and downs it looks
like everything is going like I want, except one thing. That's the focus on
a textbox control. I have a mainform with a menu, the menu shows an other
form with some testboxes (and labels) on it. After activating this form I
want the first textbox to have the focus and the keybord to be
enabled/visible. I tried a lot but I could get it working to get the focus
on the textbox, in the activate event I have the textbox.focus() method but
the control doesn't get the focus (but the activate is executed).

Does anyone have an idea how to solve this? (I had the samen in eVB and that
works perfect, but it klooks like the event handling of .NET CF acts very
different)

regards,

Tony (The Netherlands)
 
Not sure why it fails when used in Activate event, but you could try
activating a short (100 msec) timer inside Activate event and set focus on
the timer event (then disable the timer)
 
Back
Top