回复 6楼aykuang456的帖子
可以重写ProcessCmdKey方法来处理keys。
- protected override bool ProcessCmdKey(ref Message msg, Keys keyData)
- {
- Keys key = keyData & ~(Keys.Shift | Keys.Control);
- switch (key)
- {
- case Keys.I:
- if ((keyData & Keys.Control) != 0)
- {
- browserTextControl1.Selection.Italic = !browserTextControl1.Selection.Italic;
- return true;
- }
- break;
- }
- return base.ProcessCmdKey(ref msg, keyData);
- }
复制代码
具体参考文档:
http://www.textcontrol.com/en_US/blog/archive/20091007/ |