如何使输入满几位数后自动跳到这个控件
编号:QA001600
建立日期: 1999年8月26日 最后修改日期:1999年8月26日
所属类别:
Q
古月剑龙:
比如说你安装win98的时候,不是要输入序列号吗?当你在一个空白中输满几位数,然后光标就自动跳到下一个空白以待继续输入,就是那种功能。怎么做?
A回答:
比如限制为4位数:
Private Sub Text1_Change()
If Len(Text1.Text) = 4 Then
SendKeys "{tab}" ' Set the focus to the next control.
End If
End Sub
此问题由李海回答。
附加关键字:编程, 源程序, programming, source code, Visual Basic, VB, 标准控件, screen, button, combo, checkbox, listbox。
| |
|
|
| |
|
|