Need a unique gift idea?
A Pastebin account makes a great Christmas gift
SHARE
TWEET

Untitled

a guest Jun 13th, 2018 59 Never
Upgrade to PRO!
ENDING IN00days00hours00mins00secs
 
  1. private void Form_KeyPress(object sender, KeyPressEventArgs e)
  2. {
  3.     if (e.KeyChar == (char)Keys.Enter && this.ActiveControl != theRichTextBox)
  4.     {
  5.         this.DialogResult = DialogResult.OK;
  6.     }
  7. }
  8.    
  9. private void RichTextBox_Enter(object sender, EventArgs e)
  10. {
  11.     this.AcceptButton = null;
  12. }
  13.  
  14. private void RichTextBox_Leave(object sender, EventArgs e)
  15. {
  16.     this.AcceptButton = btnAccept;
  17. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top