- Start by adding a new Windows forms project to your solution.
- Call the project winformSecure and click on the OK button.
- In the Toolbox, search for the TextBox control and add it to your form.
- Lastly, add a button control to your form. You can resize this form, however you like to look more like a login form:
- With the textbox control selected on the Windows forms, open up the Properties panel and click on the Events button (it looks like a lightning bolt). In the Key group, double-click on the KeyPress event to create the handler in the code behind:
The code that is created for you is the KeyPress event handler for the ...