473,233 Members | 1,414 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,233 software developers and data experts.

MouseWheel off without DLL?

Is it possible to disable the mouse wheel WITHOUT using a DLL?

I've looked at Microsoft Knowledge Base Article 278379
(http://support.microsoft.com/default...;en-us;278379), which
explains how to create a DLL and implement code to disable the mouse wheel,
as well as Mr. Lebans' code in MouseWheelHookA2K.zip
(http://www.lebans.com/mousewheelonoff.htm), but both require a DLL.

Sure, it's easy enough to run:

regsvr32 "C:\Program Files\MyDatabase\MouseWheel.DLL"

But the less users have to do the better. I think I remember seeing some
code somewhere that did not use a DLL... or was just an illusion?
Nov 12 '05 #1
6 6309
Did you even notice with my solution that you MUST NOT try to Register
the MouseHook DLL as it is a standard WIndows DLL not an ActiveX DLL.
You simply copy the DLL into the same folder as your MDB and your users
do not have to do anything.

--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
"deko" <de**@hotmail.com> wrote in message
news:mk******************@newssvr25.news.prodigy.c om...
Is it possible to disable the mouse wheel WITHOUT using a DLL?

I've looked at Microsoft Knowledge Base Article 278379
(http://support.microsoft.com/default...;en-us;278379), which explains how to create a DLL and implement code to disable the mouse wheel, as well as Mr. Lebans' code in MouseWheelHookA2K.zip
(http://www.lebans.com/mousewheelonoff.htm), but both require a DLL.

Sure, it's easy enough to run:

regsvr32 "C:\Program Files\MyDatabase\MouseWheel.DLL"

But the less users have to do the better. I think I remember seeing some code somewhere that did not use a DLL... or was just an illusion?


Nov 12 '05 #2
> Did you even notice with my solution that you MUST NOT try to Register
the MouseHook DLL as it is a standard WIndows DLL not an ActiveX DLL.
You simply copy the DLL into the same folder as your MDB and your users
do not have to do anything.


I see. I wasn't sure what the difference was between the MouseHook.DLL and
the DLL I created from the KB article. I'll take another look...
Nov 12 '05 #3
My DLL is written in C++ and uses an application wide MessageHook. This
means the subclassing code resides in the DLL(safer) and you only have
to invoke the MouseWheelOff function once and it looks after all forms
you may open during the current session. It also allows the MouseWheel
to continue to work where it should, in controls with ScrollBars
including SubForm controls.

--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
"deko" <de**@hotmail.com> wrote in message
news:Qt*******************@newssvr29.news.prodigy. com...
Did you even notice with my solution that you MUST NOT try to Register the MouseHook DLL as it is a standard WIndows DLL not an ActiveX DLL. You simply copy the DLL into the same folder as your MDB and your users do not have to do anything.
I see. I wasn't sure what the difference was between the

MouseHook.DLL and the DLL I created from the KB article. I'll take another look...


Nov 12 '05 #4
> My DLL is written in C++ and uses an application wide MessageHook. This
means the subclassing code resides in the DLL(safer) and you only have
to invoke the MouseWheelOff function once and it looks after all forms
you may open during the current session. It also allows the MouseWheel
to continue to work where it should, in controls with ScrollBars
including SubForm controls.


Sounds great. The joker in the pack is that I want to keep the mouse wheel
functionality on the main form in my mdb, and selectively disable it on
other forms, some of which are popups.

I've imported the standard module from A2KMouseWheelHookVer21 and *did not
put any code* in the main form's module. I put this code in the other
(popup) forms' Form_Load events:

Private Sub Form_Load()
Dim blRet As Boolean
blRet = MouseWheelOFF(False)
End Sub

And this code in the popup forms' Form_Close events:

Private Sub Form_Close()
Dim blRet As Boolean
blRet = MouseWheelON
End Sub

Does this sound about right? Is it okay to use the above code to turn the
mouse wheel on and off for different forms? Does it matter if I put the
code in the Form_Open event rather than in the Form_Load event?

It seems to be working... and I did not have to register the DLL :)
Nov 12 '05 #5
There are no problems with your current implementation.

I do not understand why you would want to leave the MouseWheel turned on
for your main form. You can't possibly want to allow the users to
inadvertently scroll through the Recordset. Remember, with the
MouseWheel turned off the wheel still works for all of the controls but
simply will not allow the user to scroll through the recordset unless
they place the cursor within the Record Navigation ToolBar.

--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
"deko" <de**@hotmail.com> wrote in message
news:Kt*******************@newssvr29.news.prodigy. com...
My DLL is written in C++ and uses an application wide MessageHook. This means the subclassing code resides in the DLL(safer) and you only have to invoke the MouseWheelOff function once and it looks after all forms you may open during the current session. It also allows the MouseWheel to continue to work where it should, in controls with ScrollBars
including SubForm controls.
Sounds great. The joker in the pack is that I want to keep the mouse

wheel functionality on the main form in my mdb, and selectively disable it on other forms, some of which are popups.

I've imported the standard module from A2KMouseWheelHookVer21 and *did not put any code* in the main form's module. I put this code in the other
(popup) forms' Form_Load events:

Private Sub Form_Load()
Dim blRet As Boolean
blRet = MouseWheelOFF(False)
End Sub

And this code in the popup forms' Form_Close events:

Private Sub Form_Close()
Dim blRet As Boolean
blRet = MouseWheelON
End Sub

Does this sound about right? Is it okay to use the above code to turn the mouse wheel on and off for different forms? Does it matter if I put the code in the Form_Open event rather than in the Form_Load event?

It seems to be working... and I did not have to register the DLL :)


Nov 12 '05 #6
I do not understand why you would want to leave the MouseWheel turned on for your main form. You can't possibly want to allow the users to inadvertently scroll through the Recordset.


There is some value add to the users if they can scroll. The database is a
Personal Information Manager.


Nov 12 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: deko | last post by:
Is it possible to disable the mouse wheel WITHOUT using a DLL? I've looked at Microsoft Knowledge Base Article 278379 (http://support.microsoft.com/default.aspx?scid=kb;en-us;278379), which...
2
by: Jack | last post by:
Hi all, I searched the archives and found everyone happy with Stephen's MouseWheel On/Off code except for those with subforms. Stephen's page indicates that he has added code to handle subforms...
0
by: Mark Johnson | last post by:
Seems the mousewheel isn't controlled in earlier versions like A97 or 2000. So you can accidentally use the mousewheel to scroll to the next record in an unbound form. And that can cause Access to...
1
by: Niranjan | last post by:
I have a data entry form. I am trying to avoid users accidentally using the mouse wheel and saving an incomplete record (or saving record that skips the validation routine). In Mousewheel event,...
5
by: Dennis | last post by:
I have a form with buttons and a custom control I wrote showing a list of items. I would like to scroll the list when the mouse is over the control and the mouse wheel is moved but yet don't want...
1
by: Nicholas Shewmaker | last post by:
(I apologize if this posts twice. My AVG is being fussy.) From what I've read, MouseWheel is a very tricky event. I have replaced my Python tcl84.dll and tk84.dll files with those in the...
7
by: James | last post by:
Hi, I have a Windows Forms application which uses multiple child forms (MDI interface). The height of one of the child forms is larger than the height of the MDI client area, so when this...
3
by: Dave K | last post by:
I seem to be missing something... I want to use a mousewheel event in my VB.NET app... and there's a lot of example code on the net showing how to use the mousewheel event... and the .NET docs...
0
by: WaterWalk | last post by:
Hello. When I tried to make Tkinter canvas widget respond to MouseWheel event on Windows XP, I failed. The canvas just doesn't receive MouseWheel event. I used bind_all to find out which widget...
1
by: =?Utf-8?B?UmljaA==?= | last post by:
In a database search application (vb2005), the user wants to be able to scroll through records using the mousewheel. The data display form contains textboxes for the main data and a datagridview...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
0
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
0
Git
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
1
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into 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: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...
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...

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.