A abclililove Unregistered / Unconfirmed GUEST, unregistred user! 2005-04-23 #1 我想在RichTextBox中的光标位置输入回车时或某个字符时弹出快捷菜单,请问各位大侠有没有办法实现?跪求散分了。
A abclililove Unregistered / Unconfirmed GUEST, unregistred user! 2005-04-23 #2 我想在RichTextBox中的光标位置输入回车时或某个字符时弹出快捷菜单,请问各位大侠有没有办法实现?跪求散分了。
X xeen Unregistered / Unconfirmed GUEST, unregistred user! 2005-04-23 #3 private void richTextBox1_KeyDown(object sender, System.Windows.Forms.KeyEventArgs e) { if(e.KeyCode == Keys.Return) { contextMenu1.Show(richTextBox1,richTextBox1.GetPositionFromCharIndex(richTextBox1.SelectionStart)); e.Handled = true; } }
private void richTextBox1_KeyDown(object sender, System.Windows.Forms.KeyEventArgs e) { if(e.KeyCode == Keys.Return) { contextMenu1.Show(richTextBox1,richTextBox1.GetPositionFromCharIndex(richTextBox1.SelectionStart)); e.Handled = true; } }