Disable mousewheel for one form only

G

Guest

I have a form that I wish to disable the wheelmouse on. I have followed the
directions given here: http://www.lebans.com/mousewheelonoff.htm.

However...

This particular form will be left open most of the day. From this form users
can enter new service logs, click a "save" button and the form remains open
for the next entry.

As I mentioned, I followed the instructions from www.lebans.com, but when I
then go to a different form the wheelmouse is disabled, but I want it to be
active.

My question is, can the wheelmouse be disabled on only one form, or does it
have to apply to all forms?

I inserted the code on the forms OnLoad event, should it be somewhere else?

This is what is in the Form:

Private Sub Form_Load()
' Turn the MouseWheel Off
Dim blRet As Boolean
blRet = MouseWheelOFF
End Sub
 
D

Douglas J. Steele

I don't have MouseWheelOnOff handy, but I recall that you need to enable it
when the form loads, and disable it when the form unloads.

Try putting those statements into the form's Activate (or GotFocus) and Lost
Focus events instead.
 
K

Ken Snell \(MVP\)

Douglas J. Steele said:
I don't have MouseWheelOnOff handy, but I recall that you need to enable it
when the form loads, and disable it when the form unloads.

This is correct.
 

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