Mousetrap
by Peter Walker - papwalker.com (subform bug fixed - thanks to Terry Kreft)
Over 10,000 downloads!
MouseTrap is an Active-X control designed to prevent the mousewheel from interfering with MS Access record movements.
MouseTrap has two Properties..
Whilst these properties may seem similar they are fundamentaly different.
The Enabled property when set to True 'hooks' or 'subclasses' the forms Window Procedure. That enables the control to intercept window messages. When set to False it 'unhooks' the WindowProcedure restoring it to default. It is False by default. To disable wheel it must be set to True to 'hook' messages..
The Wheel On property
tells the 'hook' code wether to let wheel messages through. The
form remains 'hooked' regardless of the state. This property will
of course have no effect if the control is disabled.
It is False by default, the wheel disabled.
Simple and easy
Simply place the control on the on a form and set the enabled
property as desired.
Setting the Enabled property is as simple as double clicking in
the conrtrol in design view and ticking the check box in the
dialog. The Wheel On property can only be set in code. The
Default is false The mouse wheel is disabled.
It stops record movement regardless of the control type that has the focus, but still lets combo boxes etc scroll using the wheel.
It has been tested on Access '97, 2000, 2002(XP), 2003.
For mass distribution use a login script to copy and register using regedit /s or regsvr32 /s.
I have rolled this out to hundreds of desktops in the time it takes to write a two line login script edit.

There are two versions of MouseTrap
available at the moment.
Version 6.x is based on VB6
Version 5.x is based on version VB5.
The runtime files for VB are required. Very few machines will not
have these for either version already.
VB5 version...http://www.papwalker.com/public/mousetrapv.ocx
VB6 Version...http://www.papwalker.com/public/zmousetrap.ocx
How to Register
your Active-X library in the system registry using Access
Access 97 Database with stored control. (Run EnumRefs()) or
pressctrl-F10 to extract and register the control.)
Put this database in the folder you plan to keep the ocx in prior
to extracting it. (Say c:\zMouseTrap)
http://www.papwalker.com/public/mousetrap.mdb
Freeware.
Use this Library at your own discretion.
Report
Faults to info@papwalker.com