473,606 Members | 2,115 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 MouseWheelHookA 2K.zip
(http://www.lebans.com/mousewheelonoff.htm), but both require a DLL.

Sure, it's easy enough to run:

regsvr32 "C:\Program Files\MyDatabas e\MouseWheel.DL L"

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 6330
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.c om> wrote in message
news:mk******** **********@news svr25.news.prod igy.com...
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 MouseWheelHookA 2K.zip
(http://www.lebans.com/mousewheelonoff.htm), but both require a DLL.

Sure, it's easy enough to run:

regsvr32 "C:\Program Files\MyDatabas e\MouseWheel.DL L"

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.c om> wrote in message
news:Qt******** ***********@new ssvr29.news.pro digy.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 A2KMouseWheelHo okVer21 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(F alse)
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.c om> wrote in message
news:Kt******** ***********@new ssvr29.news.pro digy.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 A2KMouseWheelHo okVer21 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(F alse)
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
1010
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 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:
2
2992
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 ("Bug Fix for SubForms with ScrollBars. Bug fix for SubForms without visible ScrollBars.") - BUT I still can't get it to work on my app with my subforms. I'm using Access 2000, It works fine on the main forms but not on the
0
1919
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 hang-up, with an unbound form. I had this little popup box that was an alternative to editing text in a memo field. And every now and then I'd forget about the mousewheel problem and just habitually scrool as if editing in U-edit or something....
1
2213
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, I have a boolean variable (blnMousewheel) that is set to true. In the beforeupdate form event, an If statement cancels any changes if the blnMousewheel is true. It also sets the boolean variable to false. It works most of the time, but some...
5
2694
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 to set the focus to my control. How can I do this. Currently, I set the focus to my control when the mouse hovers over my control but this could cause a user problems with the lost focus event on any other control he is using at the time. It...
1
11210
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 ActiveTcl distribution to fix the crashes caused by the event. Then, I managed to see that my test script (see code below) was registering the event by printing the delta value (+/- 120). ----------------- from Tkinter import *
7
11506
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 form is visible, the vertical scroll bar of the MDI parent appears automatically. What I want to do is write a routine within the MouseWheel event of the MDI
3
3581
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 discuss the mousewheel event... but there doesn't seem to BE a mousewheel event. in VS 2003 or 2005, in C# or in VB.NET... and on the couple systems I've checked. I can't find a single control that gives me a "MouseWheel" event option in it's...
0
2483
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 receives this event and the result showed that only the top Tk widget gets it. This is really annoying. I wonder if this problem exists on other platform. I googled, but found no appliable solution, so I wrote one as following. It's not perfect,...
1
2466
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 for the detail data for each main record. The form also contains btnBegining, btnPrevious, btnNext, btnEnd. In the btnNext.MouseWheel event I can increment/decrement the main data currencymanager position of the main dataset (depending on...
0
8009
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
7939
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8428
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8078
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8299
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
5456
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
3964
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2442
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
1285
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.