我在.NET WinForms有一个RichTextBox。我一直在和KeyUp连接热键。除了CtrlI之外,一切都运行得很好。当我的处理程序轮到它的时候,选择已经被替换为'\t‘。我关闭了ShortcutsEnabled,但这没有任何区别。有什么想法吗?
发布于 2008-11-11 20:59:06
如下所示:
using System;
using System.Windows.Forms;
public class MyRtb : RichTextBox {
protected override bool ProcessCmdKey(ref Message m, Keys keyData) {
if (keyData == (Keys.I | Keys.Control)) {
// Do your stuff
return true;
}
return base.ProcessCmdKey(ref m, keyData);
}
}https://stackoverflow.com/questions/281997
复制相似问题