4.5. System Pens and System Brushes

System pens and system brushes are pens and brushes that are used to create system colors. In this section we will discuss how to create and use system pens and brushes.

There are two ways to create system pens and brushes. First, you can create pens and brushes using the SystemColors class. SystemColors represents the system colors in GDI+, providing static properties for system colors, such as ActiveBorder and ControlText. The second way to create system pens and brushes uses the SystemPens and SystemBrushes classes.

For performance reasons, it is a good idea to use the SystemPens and SystemBrushes classes rather than creating pens and brushes by using the SystemColors class.

4.5.1. System Pens

The SystemPens ...

Get Graphics Programming with GDI+ now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.