O'Reilly logo

C# 7 and .NET Core Cookbook by Dirk Strauss

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

How to do it...

  1. Start by adding a new Windows forms project to your solution.
  2. Call the project winformSecure and click on the OK button.
  3. In the Toolbox, search for the TextBox control and add it to your form.
  4. Lastly, add a button control to your form. You can resize this form, however you like to look more like a login form:
  1. 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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required