private void textBoxMsgSend_KeyDown(object sender, KeyEventArgs e) { if (e.KeyCode == Keys.Enter) { buttonMsgSend_Click(null, null); } }