I am making a screensaver and want to detect the mouse..
I have a picture-box that draw some gfx. The problem is that the mouse pointer is located under the picture-box (on the form). How to make so that the pointer is located "on top" of the picture -box?
Thanks in advance
/mats.
ps. my "mouse detection" look like this:
Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Static x0 As Integer
Static y0 As Integer
' Do nothing except in screen saver mode.
If RunMode <> rmScreenSaver Then Exit Sub
' Unload on large mouse movements.
If ((x0 = 0) And (y0 = 0)) Or _
((Abs(x0 - X) < 5) And (Abs(y0 - Y) < 5)) _
Then
' It's a small movement.
x0 = X
y0 = Y
Exit Sub
End If
Unload Me
End Sub
I have a picture-box that draw some gfx. The problem is that the mouse pointer is located under the picture-box (on the form). How to make so that the pointer is located "on top" of the picture -box?
Thanks in advance
/mats.
ps. my "mouse detection" look like this:
Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Static x0 As Integer
Static y0 As Integer
' Do nothing except in screen saver mode.
If RunMode <> rmScreenSaver Then Exit Sub
' Unload on large mouse movements.
If ((x0 = 0) And (y0 = 0)) Or _
((Abs(x0 - X) < 5) And (Abs(y0 - Y) < 5)) _
Then
' It's a small movement.
x0 = X
y0 = Y
Exit Sub
End If
Unload Me
End Sub