Private Sub Command1_Click(Index As Integer)
Text1.SetFocus
SendKeys Index
End Sub
Private Sub Command2_Click()
Timer1.Interval = 500
temp = Text1
Text1 = ""
End Sub
Private Sub Form_Load()
Text1 = ""
Text1.MaxLength = 10
Text1.Font = "宋体"
Text1.FontBold = True
Text1.ForeColor = vbBlue
End Sub
Private Sub Timer1_Timer()
Text1.SetFocus
Static n As Integer
If n <= Len(Text1) Then
n = n + 1
SendKeys Mid(temp, n, 1)
Else
Timer1.Interval = 0
End If
End Sub
Dim num$Private Sub Command1_Click(Index As Integer)
Select Case Index
Case 0
num = num &"0"
Text1 = num
Case 1
num = num &"1"
Text1 = num
Case 2
num = num &"闷渣纳2"
Text1 = num
Case 3
num = num &"3"
Text1 = num
Case 4
num = num &"4"
Text1 = num
Case 5
num = num &"5"
Text1 = num
Case 6
num = num &"6"
Text1 = num
Case 7
num = num &"7"
Text1 = num
Case 8
num = num &"8"
Text1 = num
Case 9
num = num &"9"
Text1 = num
End Select
End Sub
Private Sub Command2_Click()
Text1 = ""
End Sub
Private Sub Form_Load()
num = ""蚂没
End Sub
我不明白为什么要用到timer。。。界面自己做,command1要通过直接复制得到,将对应的caption值设为梁握相应的值(0~9),text1的maxlength设为10,字体自己设置
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)