Public Class Form1
Private Declare Function GetAsyncKeyState Lib "user32"(ByVal vkey As Long) As Integer
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Timer1.Interval = TextBox2.Text
Timer1.Enabled = True
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
Timer1.Interval = TextBox2.Text
Timer1.Enabled = False
End Sub
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
SendKeys.Send(TextBox1.Text)
SendKeys.Send("{enter}")
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
End
End Sub
Private Sub Timer2_Tick(ByVal sender As System.Object, ByVal e As
Dim starthotkey As Boolean starthotkey = GetAsyncKeyState(Keys.Insert) If starthotkey = True Then
SendKeys.Send(TextBox1.Text)
SendKeys.Send("{enter}")
End If
End Sub
End Class
Public Class Form1
Private Declare Function GetAsyncKeyState Lib "user32" (ByVal vkey As Long) As Integer
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Form2.Show()
Form3.Show()
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Form2.Hide()
Form3.Hide()
End Sub
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
Dim starthotkey As Boolean
starthotkey = GetAsyncKeyState(Keys.F10)
If starthotkey = True Then
Form2.Show()
Form3.Show()
End If
End Sub
Private Sub Timer2_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer2.Tick
Dim stophotkey As Boolean
stophotkey = GetAsyncKeyState(Keys.F12)
If stophotkey = True Then
Form2.Hide()
Form3.Hide()
End If
End Sub
End Class