kantersjojo
Gebruiker
- Lid geworden
- 29 nov 2008
- Berichten
- 130
Weet iemand waarom deze hotkey niet werkt? (Regel 36)
PHP:
Public Class Form1
Private Declare Function GetAsyncKeyState Lib "user32" (ByVal vkey As Long) As Integer
Private Declare Sub mouse_event Lib "user32" (ByVal dwflags As Long, ByVal dx As Long, ByVal dwextraininfo As Long)
Private Const mouseclickup = 4
Private Const mouseclickdown = 2
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
If TextBox1.Text = Val(0) Then
Timer1.Stop()
MsgBox("Please enter something higher then ''0''")
Else
Timer1.Interval = TextBox1.Text
Timer1.Start()
End If
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
If TextBox1.Text = Val(0) Then
Timer1.Stop()
MsgBox("Stop what?")
Else
Timer1.Interval = TextBox1.Text
Timer1.Stop()
End If
End Sub
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
mouse_event(mouseclickdown, 0, 0)
mouse_event(mouseclickup, 0, 0)
If GetAsyncKeyState(Keys.F4) Then
Timer1.Interval = TextBox1.Text
Timer1.Stop()
ElseIf GetAsyncKeyState(Keys.F5) Then
Timer1.Interval = TextBox1.Text
Timer1.Start()
End If
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
Label2.Text = Val(Label2.Text) + Val(1)
End Sub
Laatst bewerkt: