473,378 Members | 1,156 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,378 software developers and data experts.

Disable scrollwheel in ComboBox?

Is there a way to disable scroll wheel support in a combobox?

Basically, I have a situation where a user chooses an option in a
combobox. I'm handling the selected index change event, and due to the
option they chose, the combobox itself is being destroyed (dynamic UI).

However, if they've managed to choose an option and then roll the scroll
wheel, I'll get an unhandled exception when Windows tries to fire the
events associated with the scrollwheel choices.

Even if I can't disable the scrollwheel, is it possible to clear the
event queue of any events related to the control?
Jul 21 '05 #1
2 2593
Instead of finding a way to trap a scroll wheel, you can use a flag and then
turn it to true whenever the control itself is destroyed. And put all the
code in the selectedIndex event handler inside the false of the flag.

Not a graceful solution I agree. But still a patch like this would work till
you get a elegant solution.

"Chris DiPierro" wrote:
Is there a way to disable scroll wheel support in a combobox?

Basically, I have a situation where a user chooses an option in a
combobox. I'm handling the selected index change event, and due to the
option they chose, the combobox itself is being destroyed (dynamic UI).

However, if they've managed to choose an option and then roll the scroll
wheel, I'll get an unhandled exception when Windows tries to fire the
events associated with the scrollwheel choices.

Even if I can't disable the scrollwheel, is it possible to clear the
event queue of any events related to the control?

Jul 21 '05 #2
Ideally true, but it's not my handling of the event that's a problem.
Instead I get an exception when Windows tries to dole out the event to
my now disposed control.
Raghavendran Muraleetharan wrote:
Instead of finding a way to trap a scroll wheel, you can use a flag and then
turn it to true whenever the control itself is destroyed. And put all the
code in the selectedIndex event handler inside the false of the flag.

Not a graceful solution I agree. But still a patch like this would work till
you get a elegant solution.

"Chris DiPierro" wrote:

Is there a way to disable scroll wheel support in a combobox?

Basically, I have a situation where a user chooses an option in a
combobox. I'm handling the selected index change event, and due to the
option they chose, the combobox itself is being destroyed (dynamic UI).

However, if they've managed to choose an option and then roll the scroll
wheel, I'll get an unhandled exception when Windows tries to fire the
events associated with the scrollwheel choices.

Even if I can't disable the scrollwheel, is it possible to clear the
event queue of any events related to the control?

Jul 21 '05 #3

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

Similar topics

2
by: Chris DiPierro | last post by:
Is there a way to disable scroll wheel support in a combobox? Basically, I have a situation where a user chooses an option in a combobox. I'm handling the selected index change event, and due to...
2
by: GrandpaB | last post by:
Hi, How can I prevent the mousewheel from scrolling through the combobox items when it has the focus? Thanks, -- GrandpaB
2
by: RichG | last post by:
With the help of Cor Ligthert in a pryor post I was able to make this sub: Public Sub disableControls(ByVal frm As Form) 'this is to create a read only form that has active buttons Dim x As...
4
by: mkaszub | last post by:
Hi, I have a problem with combobox. On my form is many comboboxes and when I select same option and use my mouse roll, combobox change to next value. How to disable mouse roller? I tried to...
2
by: Ale | last post by:
how to disable a value or an option in the combobox after selecting it once.....say for ex....in students marks list...i want to enter marks of 5 subjects...whr i'll select the subject from a...
2
by: CenturionX | last post by:
Hello, Somebody knows how to disable the combobox button in Access 2002. I want to prevent the list be displayed. Thanks.
5
by: Kevinp | last post by:
I've spent the last four hours Google searching for a way to disable items in a Combobox. I found one example in C++ which I can't get to work and another in C# that I couldn't get to work either....
2
by: Claudia Fong | last post by:
Hi, I added a tabcontrol in a panel in my form. My tabcontrol have more than 3 pages.. each page contains textboxes, combobox, checkbox. I want to disable the items of each of the page of...
1
by: sirdevo | last post by:
There is one combobox on a subform named Report Soil Series Subform1. The combobox is named cboSoilSeries. I need to disable this so the user can't enter values. I could also disable the whole...
1
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: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.