Condividi tramite


Create a Windows Forms app in Visual Studio with C#

Applies to: yesVisual Studio noVisual Studio for Mac

Note

This article applies to Visual Studio 2017. If you're looking for the latest Visual Studio documentation, see Visual Studio documentation. We recommend upgrading to the latest version of Visual Studio. Download it here

In this short introduction to the Visual Studio integrated development environment (IDE), you'll create a simple C# application that has a Windows-based user interface (UI).

If you haven't already installed Visual Studio, go to the Visual Studio downloads page to install it for free.

Create a project

First, you'll create a C# application project. The project type comes with all the template files you'll need, before you've even added anything.

  1. Open Visual Studio 2017.

  2. From the top menu bar, choose File > New > Project.

  3. In the New Project dialog box in the left pane, expand Visual C#, and then choose Windows Desktop. In the middle pane, choose Windows Forms App (.NET Framework). Then name the file HelloWorld.

    If you don't see the Windows Forms App (.NET Framework) project template, cancel out of the New Project dialog box and from the top menu bar, choose Tools > Get Tools and Features. The Visual Studio Installer launches. Choose the .NET desktop development workload, then choose Modify.

    .NET Core workload in the Visual Studio Installer

Next steps

To learn more, continue with the following tutorial:

See also