How to deselect textbox if user clicks elsewhere on the form?
问题 Currently in my application it is impossible to deselect a textbox. The only way is to select another textbox. My users and I agree that clicking anywhere else on the form should deselect the current textbox. I tried overriding the MouseDown on many controls and having the focus set to a random label but it doesn't work for some controls like the MenuStrip or scrollbars. Any ideas? 回答1: Assuming you have no other controls on your forum, try adding a Panel control that can receive focus. Set