473,320 Members | 1,974 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Mouse Scroll Wheel

Does anyone know of a way to disable the mouse scroll wheel when a control
such as a combobox or listbox has focus? I ask this, because I have an
extremely large data entry form with vertical scrollbars. I have found that
when a user scrolls the wheel in an attempt to scroll the form down, a
combobox or listbox will scroll instead (if it has focus) thus changing the
user's original selection.

Thanks for any help you can provide!
Mark
Aug 21 '08 #1
2 8547
On Aug 21, 7:57 pm, Mark <M...@discussions.microsoft.comwrote:
Does anyone know of a way to disable the mouse scroll wheel when a control
such as a combobox or listbox has focus? I ask this, because I have an
extremely large data entry form with vertical scrollbars. I have found that
when a user scrolls the wheel in an attempt to scroll the form down, a
combobox or listbox will scroll instead (if it has focus) thus changing the
user's original selection.

Thanks for any help you can provide!
Mark
Hi Mark,
Here is a code sample for a listbox which is used to disable mouse
wheel scrolling:

Private Sub ListBox1_MouseWheel(ByVal sender As System.Object, _
ByVal e As System.Windows.Forms.MouseEventArgs) _
Handles ListBox1.MouseWheel
Dim disable As HandledMouseEventArgs = e
disable.Handled = True
End Sub

I tested and i hope it works for you,

Onur Güzel
Aug 21 '08 #2
Beautiful!

Thanks so much!!

Mar

"kimiraikkonen" wrote:
On Aug 21, 7:57 pm, Mark <M...@discussions.microsoft.comwrote:
Does anyone know of a way to disable the mouse scroll wheel when a control
such as a combobox or listbox has focus? I ask this, because I have an
extremely large data entry form with vertical scrollbars. I have found that
when a user scrolls the wheel in an attempt to scroll the form down, a
combobox or listbox will scroll instead (if it has focus) thus changing the
user's original selection.

Thanks for any help you can provide!
Mark

Hi Mark,
Here is a code sample for a listbox which is used to disable mouse
wheel scrolling:

Private Sub ListBox1_MouseWheel(ByVal sender As System.Object, _
ByVal e As System.Windows.Forms.MouseEventArgs) _
Handles ListBox1.MouseWheel
Dim disable As HandledMouseEventArgs = e
disable.Handled = True
End Sub

I tested and i hope it works for you,

Onur Güzel
Aug 21 '08 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: jv | last post by:
I have quite a few of continuous form and subform where I do allow scroll bars. I run into problems with the mouse wheel whenever the data on the form does not take up the whole page. In this...
1
by: Otie | last post by:
Can this be fixed? I have a combo box which is filled with lots of choices on a certain form. I click on the combo box and want to scroll down through the items using my mouse's scroll wheel....
1
by: Marcin | last post by:
Im using MS Access 2000. i have a main form and ona subform that is scrolled vertically. unfortunately i use mouse scroll to scroll this subform. I appreciate your help
7
by: tommaso.gastaldi | last post by:
This is a curious question. I'd like to know your opinion. I am attaching a drawing resize to a mouse wheel event. Frankly, to me was most natural that, if I mouse wheel UP, the shape gets...
1
by: Ima Loozer | last post by:
On one of my forms I have a text box sized and shaped to display multiple lines. The max content of the field is such that the text box may display less than all of the data in the field. ...
14
by: effendi | last post by:
Is it possible for me to disable the wheel scroll in a mouse when user click on a drop-down list? Thanks
1
by: kallol | last post by:
I have a simple HTML page where I have a form with in a <div style="height: 600px; width: 100%; overflow: auto;">. The mentioned div styles are mandatory to get the expected behavior of the div. ...
2
by: wpollans | last post by:
Hello, I need to able to write JS that will click on a link with the middle mouse button - so that the link target will open in a new window or tab - using firefox. Or is there a better (more...
1
by: Paul Brady | last post by:
First, apologies iif this is an old problem. I do read this group, but I may have missed it. When I open a form in A2K to put data into a record (or create a new record), all is well provided I...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.