What problem does it solve? Custom WinForms painting often produces flicker, resize artifacts, memory leaks, blurry text, and incorrect dark-mode colors. This Skill provides the patterns and rules needed to write correct, performant OnPaint code using GDI+ and GDI. ## Core Features & Use Cases - Flicker and Artifact Prevention: Configure DoubleBuffered, ResizeRedraw, and manual BufferedGraphics for smooth custom control painting. - Resource Management: Apply correct disposal and caching rules for Graphics, Pen, Brush, Font, and Image objects, including the never-dispose rule for SystemBrushes and SystemPens. - Text and Quality Control: Use StringFormat.GenericTypographic for precise measurement, choose between TextRenderer and DrawString, and set SmoothingMode, TextRenderingHint, and InterpolationMode correctly. - Use Case: You are building a custom owner-drawn control that must render crisp text, scale across DPI settings, and support .NET 9 dark mode. This Skill gives you the setup checklist, pen-width boundary math, and dark-mode color handling to ship it correctly. ## Quick Start Ask the AI to help you implement a custom OnPaint method for a WinForms control that avoids flicker, disposes GDI resources correctly, and supports dark mode.