dotnet-winforms-basics

Guide .NET 8+ Windows Forms development with PerMonitorV2 high-DPI scaling.

71|10|Updated Feb 11, 2026
One-click install
npx skills add https://github.com/wshaddix/dotnet-skills --skill dotnet-winforms-basics-wshaddix
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: dotnet-winforms-basics
Source: https://github.com/wshaddix/dotnet-skills/tree/main/skills/dotnet-winforms-basics
Command: npx skills add https://github.com/wshaddix/dotnet-skills --skill dotnet-winforms-basics-wshaddix

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill provides guidance on building modern Windows Forms applications using .NET 8+, addressing challenges like high-DPI scaling, dark mode, and dependency injection.

Core Features & Use Cases

  • Modern Project Setup: Learn to use SDK-style projects and the Host builder pattern for DI.
  • High-DPI Support: Implement PerMonitorV2 for crisp UIs across different screen resolutions.
  • Dark Mode: Understand the experimental dark mode features in .NET 9+ and how to prepare for future releases.
  • Modernization Tips: Get advice on migrating from .NET Framework and adopting new C# features.
  • Use Case: You're starting a new internal Windows desktop tool and need to ensure it looks good on high-resolution displays and supports dark mode.

Quick Start

Configure your .NET 8+ WinForms application to use PerMonitorV2 high-DPI mode.

Frequently Asked Questions about dotnet-winforms-basics

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I configure PerMonitorV2 high-DPI scaling in .NET WinForms?

To configure PerMonitorV2 high-DPI scaling in .NET WinForms, you update your SDK-style project application manifest to declare PerMonitorV2 compatibility, ensuring the UI renders crisply across different screen resolutions.

Can I use dependency injection with the Host builder pattern in .NET 8 WinForms?

Yes, you can use dependency injection in .NET 8 WinForms by configuring the Host builder pattern during application startup to inject services directly into your forms and UI components.

Does .NET 9 support dark mode for Windows Forms applications?

.NET 9 introduces experimental dark mode support for Windows Forms applications, allowing you to test and prepare your desktop tool's UI styling for future stable releases.

What is the best way to modernize a .NET Framework WinForms project?

The best way to modernize a .NET Framework WinForms project is migrating to an SDK-style project on .NET 8+, adopting new C# features, and implementing responsive UI development using async patterns.

Why do owner-drawn controls break with high-DPI scaling and how do I adapt them?

Owner-drawn controls break with high-DPI scaling because they bypass automatic layout adjustments; you adapt them by manually handling DPI changes and scaling graphics coordinates in your custom rendering code.