Skip to content

Files

Latest commit

945afd8 · Nov 21, 2024

History

History

windowsforms

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
Jun 29, 2023
Jun 29, 2023
Jun 27, 2023
Jun 29, 2023
Dec 22, 2020
May 29, 2024
Jun 29, 2023
Jun 14, 2023
Jun 14, 2023
Jun 14, 2023
Nov 21, 2024
Nov 21, 2024

Windows Forms for .NET Samples

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

Prerequisites

Porting apps from .NET Framework

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.

Create Windows Forms app in the command line

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

Create a Windows Forms app in Visual Studio

To create a new app in Visual Studio, see Tutorial: Create a Windows Forms app with .NET.

Filing issues and getting help

You can file Windows Forms related issues in the dotnet/winforms repo.