展开全部
Dim i%
Private Sub Command1_Click()
If Text1.Text = "" Then
Call MsgBox("TEXT内容不能为空!", vbExclamation, "提示")
Else
i = i + 1
If i Mod 2 = 0 Then
Timer1.Enabled = False: Command1.Caption = "开始"
Else
Timer1.Enabled = True: Command1.Caption = "停止"
End If
End If
End Sub
Private Sub Form_Load()
Me.Caption = "SendKeys": Command1.Caption = "开始": Text1 = "" _
: Timer1.Interval = 1000: Timer1.Enabled = False
End Sub
Private Sub Text1_Change()
If Len(Text1) > 1 Then Text1 = Left$(Text1, 1)
End Sub
Private Sub Timer1_Timer()
SendKeys "{" & Text1 & "}"
End Sub
Private Sub Command1_Click()
If Text1.Text = "" Then
Call MsgBox("TEXT内容不能为空!", vbExclamation, "提示")
Else
i = i + 1
If i Mod 2 = 0 Then
Timer1.Enabled = False: Command1.Caption = "开始"
Else
Timer1.Enabled = True: Command1.Caption = "停止"
End If
End If
End Sub
Private Sub Form_Load()
Me.Caption = "SendKeys": Command1.Caption = "开始": Text1 = "" _
: Timer1.Interval = 1000: Timer1.Enabled = False
End Sub
Private Sub Text1_Change()
If Len(Text1) > 1 Then Text1 = Left$(Text1, 1)
End Sub
Private Sub Timer1_Timer()
SendKeys "{" & Text1 & "}"
End Sub
参考资料: http://wt.honkbase.com/dh/2008/5/5/5.rar
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询