O'Reilly logo

Graphics Programming with GDI+ by Mahesh Chand

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required