Windows 7 Exe Buttons Scratch Today

// The "Red" isn't pure red. It's a gradient. Color topColor = Color.FromArgb(255, 235, 110, 110); Color bottomColor = Color.FromArgb(255, 165, 50, 50); // Draw rounded rectangle (2px radius) GraphicsPath path = GetRoundedRect(buttonRect, 2); LinearGradientBrush brush = new LinearGradientBrush(buttonRect, topColor, bottomColor, LinearGradientMode.Vertical); FillPath(path, brush);

// The Glow (Inner shadow) DrawInnerGlow(graphics, buttonRect, Color.FromArgb(120, Color.White), 1); windows 7 exe buttons scratch

But how do you rebuild those from absolute scratch? Whether you are writing a custom WinForms application, a WPF control, or just a CSS experiment, recreating the Windows 7 chrome is a lesson in precision rendering. // The "Red" isn't pure red

<Path x:Name="MinimizeGlyph" Stroke="White" StrokeThickness="1.5" Data="M 5 15 L 17 15"/> Whether you are writing a custom WinForms application,

// Center of button is X=11, Y=11 (in 0-index) int center = 11; int offset = 4; // Draw the '' line e.Graphics.DrawLine(Pens.White, center - offset, center - offset, center + offset, center + offset); // Draw the '/' line e.Graphics.DrawLine(Pens.White, center + offset, center - offset, center - offset, center + offset); In WPF, you don't draw pixels; you draw vectors. To get that "scratch" look, you need to disable native window styling ( WindowStyle="None" ) and build the caption buttons using Path geometries.