简体   繁体   中英

How to direct mousewheel scrolling to VS.net 2005 comboboxes rather than parent form?

I have an application. It is one form, and different menu options load other forms into the main content area.

Where the child forms fit into this main content area and don't have their own vertical scrollbars, clicking in one of their comboboxes allows scrolling through the combobox options using the mousewheel.

Where the forms are too long for the main content area and DO have their own vertical scrollbars, clicking in one of their combobox does not allow scrolling through the combobox options using the mousewheel. The mousewheel causes the form to scroll instead of the combobox options. I would like to change that, so that the wheel will scroll through the options instead of scrolling the form it is placed on. How?

Possibly, override the MouseWheel event. Or check if the ScrollBars are visible on the Form; if so, force Focus to the ComboBox.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM