开发者

VB textbox.focus() problem

开发者 https://www.devze.com 2022-12-23 16:50 出处:网络
I cant seem to get VB to focus on a textbox correctly at the moment I did 开发者_运维知识库 TextBox.focus()

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?


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号