Sample Name | Description |
---|---|
Hello World - shared source | This sample shows you how to share source between a .NET Framework Windows Forms application and a .NET Core Windows Forms application. Use this to get the full .NET Framework tooling experience while still building for .NET Core. |
Matching Game | This sample demonstrates simple event handling and timers in a .NET Windows Forms application |
DataGridView Sample | This sample demonstrates DataGridView usage in .NET |
Graphics Sample | This sample demonstrates using GDI+ APIs via the Graphics type in .NET |
Sudoku Sample | This sample demonstrates creating a game using event handling and the Graphics type in .NET |
Conway's Game of Life Sample | This sample demonstrates creating a DataGridView extension to handle OnRowPrePaint and trapping Windows Messages to prevent a left mouse click in .NET |
- Windows Operating System.
- Visual Studio 2022 version 17.12 or later to target .NET 9.
- Visual Studio 2022 version 17.8 or later to target .NET 8.
If you want to first understand your existing application's readiness for migrating from .NET Framework to .NET, use the .NET Upgrade Assistant. This tool analyzes projects and generates a report that you can browse to get more information about the upgrade.
To learn how to migrate a Windows Forms app, see Upgrade a .NET Framework Windows Forms desktop app to .NET.
To create a new application you can use the dotnet new
command, using the new templates for Windows Forms. Open a terminal use use the following commands:
dotnet new winforms -o MyWinFormsApp
cd MyWinFormsApp
dotnet run
To create a new app in Visual Studio, see Tutorial: Create a Windows Forms app with .NET.
You can file Windows Forms related issues in the dotnet/winforms repo.