Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

C# Winforms: How to make Return press Send?

Tags:

c#

winforms

How to keep the focus in the textBox but the Keyboard Return key presses the Send button? enter image description here

like image 294
jacknad Avatar asked Dec 12 '22 13:12

jacknad


1 Answers

If you set the AcceptButton property of the Form to be your Send button, that should make the form respond to Enter by triggering the Send button.

like image 146
Tim Avatar answered Dec 26 '22 13:12

Tim



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!