By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,164 Members | 1,019 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,164 IT Pros & Developers. It's quick & easy.

MouseHook and Tab Controls

P: n/a
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.
Nov 12 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Sounds like a Bug.
I am working on releasing the next version of the MouseHook DLL this
weekend. I'll have a look at this issue.
:-)
--

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.


Nov 12 '05 #2

P: n/a
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.


Nov 12 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.