473,762 Members | 8,115 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 8591
On Aug 21, 7:57 pm, Mark <M...@discussio ns.microsoft.co mwrote:
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_MouseW heel(ByVal sender As System.Object, _
ByVal e As System.Windows. Forms.MouseEven tArgs) _
Handles ListBox1.MouseW heel
Dim disable As HandledMouseEve ntArgs = 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

"kimiraikko nen" wrote:
On Aug 21, 7:57 pm, Mark <M...@discussio ns.microsoft.co mwrote:
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_MouseW heel(ByVal sender As System.Object, _
ByVal e As System.Windows. Forms.MouseEven tArgs) _
Handles ListBox1.MouseW heel
Dim disable As HandledMouseEve ntArgs = 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
3430
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 instance, whenever a user uses the mouse wheel to scroll down, the first record disappears off the screen and they can't get it back unless they click on the Refresh button or Page Up. The mouse wheel never scroll back up to the first record. ...
1
4046
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. But instead of scrolling through the combo box, Access 2000 starts scrolling through the records, as if I was hitting PAGE DOWN. How can I get Access 2000 to use the scroll wheel to scroll the combo box rather than go to the next record(s). The...
1
3107
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
1878
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 bigger, while it gets smaller when mouse wheel DOWN. I just noticed that Photoshop does the opposite. Any though about the most natural way (or perhaps are both "natural") ?
1
7185
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. Therefore I have the vertical scroll bar enabled for the text box object. When a user is working with this form and that text box has focus, I would like the wheel mouse to scroll the content of that field rather than scroll through the records on the...
14
13815
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
3210
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. Now, in Firefox, the page appears properly as expected. I can scroll down and up the div part by dragging the scroll bar by mouse and I can scroll down and up the div part by rolling up and down the mouse wheel as well. But I am facing the problem...
2
6977
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 reliable) way to have the link open in a new window/tab (using JS)? I have no control over the JS already on the page - this is for a selenium user extension that I'd like to write.
1
2418
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 do not touch the wheel on top of the mouse. I can do anything else with the mouse, that is, move it around the form and click on controls. But if I turn the wheel, Access closes out the current form record and begins to scroll up or down thru...
0
9554
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10137
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9989
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9927
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9812
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8814
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7360
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6640
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
3
3510
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.