Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private void Form_KeyPress(object sender, KeyPressEventArgs e)
- {
- if (e.KeyChar == (char)Keys.Enter && this.ActiveControl != theRichTextBox)
- {
- this.DialogResult = DialogResult.OK;
- }
- }
- private void RichTextBox_Enter(object sender, EventArgs e)
- {
- this.AcceptButton = null;
- }
- private void RichTextBox_Leave(object sender, EventArgs e)
- {
- this.AcceptButton = btnAccept;
- }
Add Comment
Please, Sign In to add comment