Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Submit by pressing enter in a windows form

Tags:

c#

winforms

In order to transfer text from one textbox to another, I have created a submit button. However it would be preferable to use the functionality of the 'enter' key.

I am not sure but i think the ascii code is 13.Anyway how do I go about this task at hand?

like image 508
Avik Avatar asked Mar 09 '09 06:03

Avik


People also ask

How do you submit a form when Enter key is pressed?

To submit the form using 'Enter' button, we will use jQuery keypress() method and to check the 'Enter' button is pressed or not, we will use 'Enter' button key code value. Explanation: We use the jQuery event. which to check the keycode on the keypress.

How do I use Enter key in Powerapps?

You can first hit the "Tab" key multiple times until the "Submit" button is selected, and then hit "Enter" to trigger this button and submit the form.

How do I add text to Windows form?

Step 1: Create a windows form. Step 2: Drag the TextBox control from the ToolBox and Drop it on the windows form. You can place TextBox anywhere on the windows form according to your need. Step 3: After drag and drop you will go to the properties of the TextBox control to set the Text property of the TextBox.


1 Answers

Look at the Form.AcceptButton property.

like image 129
leppie Avatar answered Oct 17 '22 01:10

leppie