MSDN Community

Getting Started with Desktop Development in Visual Studio

Visual Studio provides a comprehensive set of tools for building Windows desktop applications using WinForms, WPF, and UWP. This guide walks you through setting up a new project, designing UI, handling events, and publishing your app.

1. Create a New Project

  1. Launch Visual Studio and select File > New > Project.
  2. Choose a template: Windows Forms App (.NET), WPF App (.NET), or UWP App.
  3. Configure the project name, location, and framework version.

2. Design the UI

Use the Designer to drag-and-drop controls onto the canvas. The Properties window lets you customize appearance and behavior.

3. Write Code Behind

Double‑click a control to generate event handlers. Use C# or VB.NET to implement application logic.

4. Debug and Test

Press F5 to start debugging. Use breakpoints, watch windows, and the output console to diagnose issues.

5. Publish

When ready, go to Project > Publish to create an installer or publish to the Microsoft Store.

View Step‑by‑Step Tutorial