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. Create a new Windows forms project in Visual Studio called winformAsync. We will be creating a new Windows forms application so that we can create a button-click event. 
  1. On the winformAsync Forms Designer, openToolbox and select the Button control, which is found under the All Windows Forms node:
  1. Drag the Button control onto the Form1 designer.
  1. With the Button control selected, double-click on the control to create the click event in the code behind. Visual Studio will insert the event code for you:
      namespace winformAsync       {           public partial class Form1 : Form           {               public Form1()               {                   InitializeComponent();               }  private ...

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