Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在桌面 C# 窗体或窗口中,我有一个搜索框,即 TextBox,当用户尝试使用 Ctrl + A 突出显示文本时,系统释放声音。有什么东西可以让文本框控件接受 Ctrl + A?
试试这个:
private void textBox1_keyDown(object sender, KeyEventArgs e) { if (e.Control & e.KeyCode == Keys.A) textBox1.SelectAll(); }