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.
我试过 if (e.Control && (e.KeyCode == Keys.Z)) RTB.Undo(); 和 .Redo() 但在richtextbox中没有任何反映。我也尝试过发送消息。任何帮助都会很棒。
我试过 id 并且它工作正常。
if (e.Control && e.KeyCode == Keys.Z) richTextBox1.Undo();
您是否启用了当前表单的 KeyPreview 属性以开始捕捉按键?
谈论这个属性。