Advertisement
Guest User

Untitled

a guest
Apr 23rd, 2014
38
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  1. private void rtfContent_KeyPress(Object sender, KeyPressEventArgs e)
  2. {
  3. if (e.KeyChar == 'C')
  4. {
  5. MessageBox.Show("C");
  6. e.Handled = true;
  7. }
  8. }
  9.  
  10. this.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.rtfContent_KeyPress);
  11.  
  12. this.KeyPress +=
  13. new System.Windows.Forms.KeyPressEventHandler(this.rtfContent_KeyPress)
  14.  
  15. rtfContent.KeyPress +=
  16. new System.Windows.Forms.KeyPressEventHandler(this.rtfContent_KeyPress)
  17.  
  18. private void richTextBox1_KeyPress(object sender, KeyPressEventArgs e)
  19. {
  20. if (e.KeyChar == 'C')
  21. {
  22. MessageBox.Show("C");
  23. e.Handled = true;
  24. }
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement