1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
| PrivateSub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
Debug.Print("timer en route")
PictureBox1.Cursor = New System.Windows.Forms.Cursor("C:\Windows\Cursors\TestCurseur.cur")
EndSub
PrivateSub PictureBox1_MouseHover(ByVal sender AsObject, ByVal e As System.EventArgs) Handles PictureBox1.MouseHover
Timer1.Enabled = True
Debug.Print("coucou, j'entre")
EndSub
PrivateSub PictureBox1_MouseLeave(ByVal sender AsObject, ByVal e As System.EventArgs) Handles PictureBox1.MouseLeave
Timer1.Enabled = False
EndSub
PrivateSub PictureBox1_MouseMove(ByVal sender AsObject, ByVal e As System.Windows.Forms.MouseEventArgs) Handles PictureBox1.MouseMove
Static MouseX AsInteger, MouseY AsInteger
Debug.Print(e.X.ToString & " " & e.Y.ToString & " " & MouseX.ToString & " " & MouseY.ToString)
If e.X <> MouseX Or e.Y <> MouseY Then
Cursor = Cursors.Default
Cursor.Show()
EndIf
MouseX = e.X
MouseY = e.Y
EndSub
|
Partager