C# textbox取消焦点
时间: 2023-10-19 11:01:54 浏览: 333
使TextBox失去焦点.rar
要在C#中取消TextBox的焦点,可以使用Control类的方法,即调用Control的方法 textBox1.Focus()。
在给TextBox设定焦点之后,可以使用Control的方法textBox1.Focus()来取消焦点。这样的话,TextBox将不再是用户输入的焦点,并且它将不再具有特定的外观。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* [C# windowForm TextBox获得焦点时高亮显示](https://blog.csdn.net/zcn596785154/article/details/120214380)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 33.333333333333336%"]
- *2* [C#全能速查宝典](https://download.csdn.net/download/zgc988/7256755)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 33.333333333333336%"]
- *3* [C#高级编程(第6版).(清华出版.李铭译.黄静审校).part2](https://download.csdn.net/download/pczlang/9575297)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 33.333333333333336%"]
[ .reference_list ]
阅读全文