code for mousehook

code for mousehook

am 25.01.2008 16:09:57 von u39419

I'm trying to put the mousehook code in the load event of a switchboard,
since this is the first form that is opened when a user logs on. I know zero
about code, so what do I need to write in the load/unload event sections of
the code for the switchboard to turn it on and off? I'm using the downloaded
verison of Leban's mousehook (most recent version).

Thanks for the help

--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/Forums.aspx/databases-ms-ac cess/200801/1

Re: code for mousehook

am 26.01.2008 19:49:45 von Ed Robichaud

Lebens' download instructions and accompanying sample mdb is pretty helpful.

Summarizing that, you need the Mousehook.dll in either the Windows system
folder or in the local folder where the running mdb is. You also need the
"modMouseHook" procedures as one of your modules; copy and paste it, or
better yet, import it from the sample mdb. You may also want to have a copy
of the sample form to allow users to control the mouse scroll wheel on-off.

-Ed


' Copyright Lebans Holdings 1999 Ltd.
' www.lebans.com
' You are free to use the MouseHook.dll in any of your applications,
' whether personal or commercial providing you are not selling this DLL
' by itself or as part of a collection.

' You must copy the MouseHook.dll file into either your
' Windows System folder or into the same folder where this MDB resides.
' If you are distributing Front End/Back End MDBs then ensure that the
' MouseHook.dll file is copied to the same folder where the FRONT END MDB
resides.
' The MouseHook.dll is not an ActiveX DLL that must be registered.
' Just copy the DLL to one of the folders as indicated above.

Private Sub Form_Load()
' Default to MouseWheel ON!
Me.txtStatus.value = "The MouseWheel is turned ON"
End Sub

Private Sub Command14_Click()
' Turn the MouseWheel Off
Dim blRet As Boolean
' Call our MouseHook function in the MouseHook dll.
' Please not the Optional GlobalHook BOOLEAN parameter
' Several developers asked for the MouseHook to be able to work with
' multiple instances of Access. In order to accommodate this request I
' have modified the function to allow the caller to
' specify a thread specific(this current instance of Access only) or
' a global(all applications) MouseWheel Hook.
' Only use the GlobalHook if you will be running multiple instances of
Access!
blRet = MouseWheelOFF(False)

Me.txtStatus.value = "The MouseWheel is turned OFF except for ListBox
controls, TextBox controls with ScrollBars and the Record Navigation
control"
End Sub
Private Sub Command16_Click()
' Turn the MouseWheel On
Dim blRet As Boolean
blRet = MouseWheelON
Me.txtStatus.value = "The MouseWheel is turned ON"
End Sub
"noe1818 via AccessMonster.com" wrote in message
news:7ebde8ea17230@uwe...
> I'm trying to put the mousehook code in the load event of a switchboard,
> since this is the first form that is opened when a user logs on. I know
> zero
> about code, so what do I need to write in the load/unload event sections
> of
> the code for the switchboard to turn it on and off? I'm using the
> downloaded
> verison of Leban's mousehook (most recent version).
>
> Thanks for the help
>
> --
> Message posted via AccessMonster.com
> http://www.accessmonster.com/Uwe/Forums.aspx/databases-ms-ac cess/200801/1
>