473,324 Members | 2,179 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,324 software developers and data experts.

MouseHook and Tab Controls

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
2 2137
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Sabine Oebbecke | last post by:
Hi Experts, I try to use the code supplied in the MouseWheelHook.zip in my application to stop the mouse, but it does not work at all. I have copied the Mousehook.dll into the same folder where...
3
by: Rémi | last post by:
Hello all! I've been using Stephen Lebans' MouseWheel stuff for a number of years now, without problems. I've used on different combinations of Access and Windows, and have had great results with...
1
by: Gilz | last post by:
Hi I have been trying to use the mousehook dll to disable the scrolling function on the mouse. I have tried copying and pasting the code from Stephen Lebams website onto the on click event of...
3
by: l.green | last post by:
I have recently migrated from MS Access 2000 to MS Access 2003 and am testing all my Access apps. One app uses the Mousehook.dll which I downloaded from the web a few years ago. The .dll is in the...
15
by: Arpan | last post by:
Consider the following code which retrieves data from a SQL Server 2005 DB table & displays it in a DataGrid: <script runat="server"> Sub Page_Load(ByVal obj As Object, ByVal ea As EventArgs)...
0
by: VincentJS | last post by:
Greetings fellow programmers! Could someone explain to me HOW to call a mousehook OUTSIDE the calling thread (or program). Microsoft says following: HHOOK SetWindowsHookEx( int...
1
by: =?iso-8859-1?B?anRy/HRrZW4=?= | last post by:
I used the mousehook.dll in access 2000 to disable the mousewheel with success. I now got the problem when pressing the mousewheel on a laptop. This function is disabled on a "normal" PC but not...
3
by: Avellano | last post by:
When having two ms Access databases open, the mousehook setting from one database controls the setting in the second database. Is there any way of keeping the two completely separate and allowing...
0
by: noe1818 via AccessMonster.com | last post by:
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...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.