Focus on textbox

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)
 
A

Alex Feinman [MVP]

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)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top