Skip to Content
.NET Windows® Forms Custom Controls
book

.NET Windows® Forms Custom Controls

by Richard Weeks
January 2002
Intermediate to advanced
288 pages
5h 48m
English
Sams
Content preview from .NET Windows® Forms Custom Controls

The ControlPaint Class

Although not part of GDI+, the ControlPaint class offers several methods for drawing standard UI elements. In fact, the IconButton developed in the preceding two chapters used the ControlPaint class to draw the button itself. It is interesting to note that although this class exists, the base class library does not use it. The standard Button class, found in the System.Windows.Forms namespace, implements its own drawing logic. The class itself is worth mentioning because it does provide a mechanism for drawing standard controls such as buttons, check boxes, and even focus rectangles. Also because IL (Intermediate Language) is fairly readable, loading up System.Windows.Forms.dll into ILDASM.exe and peeking into the ControlPaint ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Pro .NET 5 Custom Libraries: Implementing Custom .NET Data Types

Pro .NET 5 Custom Libraries: Implementing Custom .NET Data Types

Roger Villela
Professional C# 5.0 and .NET 4.5.1

Professional C# 5.0 and .NET 4.5.1

Christian Nagel, Jay Glynn, Morgan Skinner

Publisher Resources

ISBN: 0672323338Purchase book