m4dc0w344
Gebruiker
- Lid geworden
- 8 aug 2011
- Berichten
- 377
hallo
ik wil een mouse recorder maken met een click.
zelf heb ik al de record gedeelte maar zonder de click, maar ik weet niet hoe ik het klik gedeelte moet toevoegen.
[CPP]Public Class Form5
Private Sub rec_tmr_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles rec_tmr.Tick
Try
ListBox1.Items.Add(Cursor.Position.X)
ListBox2.Items.Add(Cursor.Position.Y)
Catch ex As Exception
End Try
End Sub
Private Sub play_tmr_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles play_tmr.Tick
Try
Dim pos As New Point(ListBox1.Text, ListBox2.Text)
Cursor.Position = pos
ListBox1.SelectedIndex = ListBox1.SelectedIndex + +1
ListBox2.SelectedIndex = ListBox2.SelectedIndex + +1
Catch ex As Exception
End Try
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
rec_tmr.Start()
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
rec_tmr.Stop()
play_tmr.Stop()
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
play_tmr.Start()
ListBox1.SelectedIndex = "0"
ListBox2.SelectedIndex = "0"
End Sub
End Class[/CPP]
ik wil een mouse recorder maken met een click.
zelf heb ik al de record gedeelte maar zonder de click, maar ik weet niet hoe ik het klik gedeelte moet toevoegen.
[CPP]Public Class Form5
Private Sub rec_tmr_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles rec_tmr.Tick
Try
ListBox1.Items.Add(Cursor.Position.X)
ListBox2.Items.Add(Cursor.Position.Y)
Catch ex As Exception
End Try
End Sub
Private Sub play_tmr_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles play_tmr.Tick
Try
Dim pos As New Point(ListBox1.Text, ListBox2.Text)
Cursor.Position = pos
ListBox1.SelectedIndex = ListBox1.SelectedIndex + +1
ListBox2.SelectedIndex = ListBox2.SelectedIndex + +1
Catch ex As Exception
End Try
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
rec_tmr.Start()
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
rec_tmr.Stop()
play_tmr.Stop()
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
play_tmr.Start()
ListBox1.SelectedIndex = "0"
ListBox2.SelectedIndex = "0"
End Sub
End Class[/CPP]