by Peter Walker - papwalker.com (subform bug fixed - thanks to Terry Kreft)
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, wheel disabled.
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.
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.
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)
Use this Library at your own discretion.
Report Faults to email@example.com