Help, it is necessary that when you press the enter key, a message from the textbox is sent, and in the textboxe itself, the cursor does not move to a new line
Sign up for a KeyDown :
KeyDown
private void textBox_KeyDown(object sender, KeyEventArgs e) { if (e.KeyCode == Keys.Enter) { e.SuppressKeyPress = true; // отправка сообщения } }
Source: https://ru.stackoverflow.com/questions/579812/More articles:Bootstrap carouselFor an online store engine: InnoDB or MyISAM?No route matches [DELETE]Process press ctrl + aHow to break this line into an array in php?How to ignore the $ sign in a bash script?multithreading, thread 2 error: exc_bad_accessJPA interface does not accept an entity in @QuerrySpring controllersHow to assign a created object by reference on the flyAll Articles