|
-
Jul 12th, 2000, 01:54 PM
#1
Thread Starter
Junior Member
How can I find out if mouse is not being moved? I have this boolaean, blnMousemove, telling if form_mousemove is called, but I've got to find out an opposite to it.
-
Jul 12th, 2000, 02:13 PM
#2
You can keep checking it's position in a Timer.
Code:
Private Declare Function GetCursorPos Lib "user32" (lpPoint As POINTAPI) As Long
Private Declare Function SetCursorPos Lib "user32" (ByVal X As Long, ByVal Y As Long) As Long
Private Type POINTAPI
X As Long
Y As Long
End Type
Dim CurPos As POINTAPI
Dim OldX As Single
Dim OldY As Single
Private Sub Form_Load()
Timer1.Interval = 10
End Sub
Private Sub Timer1_Timer()
'The the coordinates of the Mouse
Retval = GetCursorPos(CurPos)
X = CurPos.X
Y = CurPos.Y
If OldX = X And OldY = Y Then
'The mouse is still
Print "Mouse is Still"
Else
'the Mouse is not still
OldX = X
OldY = Y
End If
End Sub
-
Jul 13th, 2000, 01:12 AM
#3
Lively Member
hiya,
whaddya mean by that?? i men as long as u DO NOT get the mouse move event it isn't moving right?? 
or do u have something more whacky in mind??
cheers
Gaurav
[email protected]
" Programming today is a race between software-engineers striving to build bigger and
better idiot-proof programs and the universe trying to produce bigger and better idiots.
So far the universe is winning". :-)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|