Yes i want to keep checking the mouse to see if it is hooked using a while loop.
Main Topics
Browse All Topics
Is it possible to determine if the mouse is being hooked ? I mean coding this condition in a true or false statement. :)
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Not sure I know what you mean by hooked, but if you simply want to see if the mouse is being used or moved you can do something like this.
'In form
Private Sub Command1_Click()
Timer1.Interval = 1
While 0 = 0
If curLoc <> oldLoc Then Label1.Caption = "Moving"
If curLoc = oldLoc Then Label1.Caption = "Idle"
DoEvents
Wend
End Sub
Private Sub Timer1_Timer()
oldLoc = curLoc
curLoc = getXYLoc
End Sub
'In Module
Option Explicit
Private Type POINTAPI
Y As Long
X As Long
End Type
Declare Function GetCursorPos Lib "user32" (lpPoint As POINTAPI) As Long
Public curLoc As String
Public oldLoc As String
Function getXYLoc() As String
Dim mousePT As POINTAPI
Dim X As Long
Dim Y As Long
X = 0
Y = 0
Call GetCursorPos(mousePT)
X = mousePT.X
Y = mousePT.Y
getXYLoc = CStr(Y & "," & X)
End Function
Business Accounts
Answer for Membership
by: amit_panjwaniPosted on 2001-03-28 at 08:53:25ID: 5966689
Do you want to constantly check for Mouse during operation?
or just one time when application is initializing.