袁磊的个人资料:vb 中 怎么使用控件TextBox让输入完数字后自动跳转??

来源:百度文库 编辑:高考问答 时间:2024/05/03 17:43:28
vb 中 怎么使用TextBox控件让输入完数字后自动跳入到下个需要输入的TextBox控件中??

Private Sub Text_Change(Index As Integer)
If Index < Text.Count - 1 Then If Len(Text(Index)) = Text(Index).MaxLength Then Text(Index + 1).SetFocus
End Sub'/MaxLength 为最大字符长度。可设为5

编写change事件
if len(text1)>5 then
text2.setfours '把焦点交给text2 不知道是不是这么拼,我这没有编译器
endif