I've gone to Lebans and read through the posts on the mouse wheel.

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

And I still don't understand how to disable it. I am a very novice user, I
don't know VBA. Also, this is a work database/computer so I am nervous about
downloading anything onto it. Any ideas???
 
Sorry, just realized you can't read the whole subject line, I still don't
understand how to disable the mouse wheel and I've read through the
posts.....I am a very novice user, I
 
Unfortunately that is not a novice task. Either deal with the issue, or
make a backup of the file and try to include the code listed. Worst case
scenario you mess up a copy and have to give up or try again.
 
That's what I was afraid of, and I read through Microsoft and their solution
is advanced also. And this is posing a big problem because my database page
is longer than the winder, so you do need to scroll down to see all of the
fields in the record...UGH!
 
The code cannot in any way harm your current MDB. All that it does is
listen for MouseWHeel messages being sent to your forms. If the
MouseWHeelHook is enabled then it simply destroys these MouseWHeel
messages BEFORE your form receives them. That's it.

Copy the MouseWHeelHook.DLL file into the same folder as your work MDB
Import the single standard Code module named modMouseHook from my sample
MDB into your own.

Open one and only one of your Forms in your application, preferably the
Form that opens first and closest last.
Open the Form's Properties sheet
Select the Event TAB
For the On Load property select "Event Procedure" from the dropdown
For the On UnLoad property select "Event Procedure" from the dropdown

Now you need to add code for each of the two form events, Load and
Unload. Next tot he dropdown where you selected "Event Procedure" there
is an ellipse(3 periods ...), click on the ellipse and you will find
yourselve in the VB IDE with your cursor in the Load(or Unload) sub.

Add the following code for the Load event

dim blRet as Boolean
blRet = MouseWheelOFF(True, False)


Scroll down and find the Unload event and add the following code:
dim blRet as Boolean
blRet = MouseWheelOn


THe most important thing you need to uderstand is that you only have to
call the MouseWheelOff function ONCE. It will automatically look after
any forms currently open and any that you will open later on.
Similiarly, you only call the MouseWheelOn function ONCE when your
application is closing.


Let me know how you make out.

--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
 
When I wanted to disable mouse wheel scrolling I investigated as many options
as I could find, and concluded that Lebans' was the simplest to implement.
Take your time and proceed one step at a time and you should be fine. If you
don't understand a step, stop there and post again to this newsgroup. I will
add that when I first used the mouse wheel disabling procedure it did not
work. I compared the references in Lebans' sample database with the
references in mine, and discovered that I was missing one. I added the
missing reference, and the mouse wheel has been disabled in my database ever
since. (I don't offer the option of toggling it on and off.) To check the
references, in any code window click Tools > References.
 
I started using this about a week ago. It was trivial to install and worked
perfectly after I eventually downloaded the latest version (by mistake, I
initially download an older version of MouseHook.dll --- but Stephen Labans
got me straightened out on this forum regarding that matter). It's great
piece of code! Bob.
 
Ok, thanks for all of the help. This alll seems so WAY over my head, but I
am going to give it a try and I will probably definitely be posting for more
help! (o;
 
Actually, I have another question, right now this database is just saved onto
my desktop, once it's completed it will be put into a shared drive that
everyone here uses. Do I need to copy the database into the shared drive now
in order to make the mousewheel changes? Or would I just save the dll file
onto my desktop, where the database is?
 
IT WORKED!! IT WORKED!!!! IT WORKED!!!!!

I know I'm probably pushing my luck here, but I suppose there's no way to
make the mousewheel still work as far as scrolling down the page, but not
through the records? I'm assuing it's kind of an all or none thing?

THANK YOU!!!!!!!!!!!!
 
Unfortunately Peter I somehow changed the program logic in this newest
release. Prior to this verison, if you selected NO for the SubFormScroll
parameter, you would get the default scrolling of the form you are
looking for.
I honestly will not have a chance to go back and release the next
version of the MouseWheelHook DLL until this summer.
--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
 
I had success saving the dll into the same folder as the database itself on
the network drive. Perhaps "IT WORKED!" means you already discovered that.
 
The code in the module looks for MouseHook.dll in two folders --- the folder
containing the mdb (or mde...)and \windows\system (or whatever --- based on
your version of Windows). When you deploy the application, you must deploy
MouseHook.dll along with it ... whether on a desktop, shared folder, etc.
In a shared environment, it seems best to keep it in the shared folder.

The dll is not registered, by the way.
 
Back
Top