If you make a new C# project and place a NumericUpDown on the form (or even a textbox for that matter) is it impossible to deselect?
Currently my application has a scrollable container and when a user selects a NumericUpDown he or she cannot deselect it. Then when trying to use the scrollwheel on the mouse for anything, it scrolls the value of the NumericUpDown.
Ideally, when the user clicked in a blank spot on the form it would select the form and deselect the NumericUpDown. Either that or disable mouse-wheel scrolling on the NumericUpDown in general (not sure how to do this either). The NumericUpDown’s contain data that is not bound to change often, so it would not really impact the user by that much at all.
To disable the mouse wheel scrolling on a
NumericUpDownyou’d need to create your own descendant control that overrides theOnMouseWheelevent, and use the custom control on your form.To answer your question about control Focus, I believe you would need to have at least one other control on the form to hand off the Focus too.