Home > Software engineering > The new consult, how to start form the beginning, the cursor focus on a certain texbox? In texbox in
The new consult, how to start form the beginning, the cursor focus on a certain texbox? In texbox in
Time:09-18
The new consult, how to start form the beginning, the cursor focus on a certain texbox? In texbox input correctly to jump to other texbox control implementation? Due to the new, foundation is weak, so problem superficial or very unreliable, but great spirit in the BBS, please do not laugh and glad! Thank you very much!
CodePudding user response:
With textbox1. The setfocus to set the current focus to textbox1
form_load, set the focusTextbox1_LostFocus, set the focus,
CodePudding user response:
Need to show before the load
CodePudding user response:
In your Form design window, use the mouse to select the TextBox, then put it in the properties window of the TabIndex attribute to 0, so, in the Form starts, it gains focus by default,
CodePudding user response:
Private sub Form_Load () Me. Show Text1. SetFocus End Sub Private sub Text1_LostFocus () If Text1. Text & lt;> "Test" right Then Text1. SetFocu End Sub
CodePudding user response:
Private Sub Form_Load () Me. Show Text1. SetFocus End Sub In the design of interface, Text1 TabIndex attribute is set to 0, the Text2 TabIndex attribute is set to 1, will Text3 TabIndex attribute is set to 2... After fill in the content such as Text1 press [Tab] can move focus in turn,
CodePudding user response:
Like they say, the old version set focus is textbox. Setfocus, In the 2008 version directly is textbox. Fous, will not used to?