Lebans MouseHook question

B

BruceM

In some of my Access applications I have been using Lebans's code for
disabling the mouse wheel. It was worked well, but I may not have paid much
attention to the nuances. Specifically, I want the disable mouse wheel
functionality limited to the current database. The MouseWheelOFF function
contains the following line:

MouseWheelOFF = StopMouseWheel(Application.hWndAccessApp, _
AccessThreadID, NoSubFormScroll, GlobalHook)

My understanding is that the last two arguments are optional (False). If I
want to disable the mouse wheel for just the current Access application:

MouseWheelOFF = StopMouseWheel(Application.hWndAccessApp, _
AccessThreadID, NoSubFormScroll)

If I want further to enable scrolling in subforms for the current
application only:

MouseWheelOFF = StopMouseWheel(Application.hWndAccessApp, _
AccessThreadID)

From my experiments it seems that removing the optional GlobalHook argument
allows the mouse wheel to be used for scrolling in other Access
applications. However, there are also optional subform scrolling and
GlobalHook arguments in MouseWheelOff for the same purpose. However,
calling the MouseWheel function without any of the optional arguments does
not seem to allow mouse wheel scrolling in other applications until I close
the form (I call MouseWheelOn in the form's Close event).

Do I understand this correctly regarding the optional arguments in
StopMouseWheel? If so, I do not understand why the same optional arguments
exist in MouseWheelOff as in StopMouseWheel.

Again, I am very glad to have the utility available. I am just curious
about a few things.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top