What controls are needed?
-1xTimer
-2xButton
-1xTextBox
Then times to the Coden. Pictures follow in hindsight!
First of all, we need an import command, which we write up to the top in the code before Public Class. This is called Imports System.Net, then to the rest.
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
Button1.Text = "Start" 'Button1 erhällt den Text Start
Button2.Text = "Stop" 'Button2 erhällt den Text Stop
End Sub
next add the 2 buttons now if u have not done that all ready
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Timer1.Start()
End Sub
Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
Timer1.Start()
End Sub
now add
Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
Timer1.Stop()
End Sub
now timer1 coode
Private Sub Timer1_Tick(sender As Object, e As EventArgs) Handles Timer1.Tick
My.Computer.Keyboard.SendKeys(TextBox1.Text & vbNewLine)
Me.Label1.Text = +1
If CheckBox1.Checked Then
My.Computer.Keyboard.SendKeys(CheckBox1.Text)
End If
End Sub
press f5
now have some fun
(This post was last modified: 06-15-2017, 04:55 AM by viruss.) -1xTimer
-2xButton
-1xTextBox
Then times to the Coden. Pictures follow in hindsight!
First of all, we need an import command, which we write up to the top in the code before Public Class. This is called Imports System.Net, then to the rest.
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
Button1.Text = "Start" 'Button1 erhällt den Text Start
Button2.Text = "Stop" 'Button2 erhällt den Text Stop
End Sub
next add the 2 buttons now if u have not done that all ready
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Timer1.Start()
End Sub
Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
Timer1.Start()
End Sub
now add
Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
Timer1.Stop()
End Sub
now timer1 coode
Private Sub Timer1_Tick(sender As Object, e As EventArgs) Handles Timer1.Tick
My.Computer.Keyboard.SendKeys(TextBox1.Text & vbNewLine)
Me.Label1.Text = +1
If CheckBox1.Checked Then
My.Computer.Keyboard.SendKeys(CheckBox1.Text)
End If
End Sub
press f5
now have some fun