views:

39

answers:

1

I cant seem to get VB to focus on a textbox correctly at the moment I did

TextBox.focus()

in the load event but still a button keeps grabbing focus anyway. Does anyone know why this would happen?

+1  A: 

Try changing the tabindex property.

in webforms, see http://www.w3schools.com/aspnet/prop_webcontrol_standard_tabindex.asp

in winforms View -> Tab Order when the desing view is open

if that doesnt work, try calling the Select() method on your TextBox.

Ivo
damn, beat me to it!
Pondidum