I've uploaded a new version tonight.
http://www.lebans.com/mousewheelonoff.htm
MouseWheelHook97.zip is an MDB demonstrating how to use a MouseHook to
turn off the MouseWheel. No more MouseWheel.DLL Hell! No DLL
registration required. No setting References from within Access. Just
copy the included MouseHook.DLL into your Windows/System folder or into
the same folder as your application MDB. One instance handles all Forms
and SubForms so only call the functions once from a SINGLE Form. Here is
an A2K sample MDB including the DLL. MouseWheelHookA2K.zip . Please note
there is no difference between the MouseHook.DLL included in either the
A97 or A2K ZIP file.
Version 2.1
Now correctly handles Tab and Option Group controls. Removed Bug that
would at times allow a multiline TextBox control to pass the MouseWheel
messages onto the Form. Allows users to Scroll within a ComboBox
control. Allows MouseWheel to work in SubForms. Leaves all non Access
Form windows alone! The logic in the DLL was completely rewritten.
Works with all Access Form controls.
**Remember to remove any existing instances of the MouseHook.DLL from
your system. When you call the code from your Form it first looks into
your Windows/System folder for the MouseHook.DLL. If it is not found
then it will look into the folder where the current MDB resides. This
means if you copy the newest version of the DLL into your application
folder but still have an older version in your Windows/System folder the
OLDER version will be used!**
--
HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
"AccessWhiz" <md*******@hotmail.com> wrote in message
news:19**************************@posting.google.c om...
I have had some good success using MouseHook from Stephen Lebans.
(I've downloaded and am using the current version of MouseHook dated
7/2/2003).
However, I do have a question regarding MouseHook. I have a form with
a tab control. Each page in the tab control uses fields from the same
table. In the OnLoad event of the form the wheel on the mouse is
disabled.
Everything seems to work okay. When I click on a tab, and try using
the mouse wheel, nothing happens. Changing to another tab, I get the
same results. So far, so good.
If I click on a tab (tab_change event fires) and then click on the
*same* tab again (which does NOT fire the tab_change event a second
time) suddenly the mouse wheel starts working again. Moving the focus
back to a control on the same tab page stops the mouse wheel. I would
like to have the mouse wheel disabled for everything on the form. Is
there any way I can do that?
Thanks in advance for your help.