I just wonder when is it advisable to use these classes that are prefixed
with System
SystemBrushes,SystemColors,SystemFonts,SystemPens,SystemIcon
instead of these classes that I'm more used to
Brushes,Colors,Fonts,Pens,Icons ?
Those classes simply contain "pre-built" objects are just instances of the
non-System-prefixed classes. So SystemBrushes just contains a bunch of Brush
(SolidBrush) objects. What's handy about them is that you don't have to
worry about disposing of these objects, since they're global. (Well, you
never have to worry about disposing of a Color, but you know what I mean.)
Be aware, though, that the colors of SystemBrushes are totally depended on
the current user's color scheme, so SystemBrushes.Control might be one shade
of gray on your machine, another on a machine using a different theme, and
perhaps white or silver on another machine. That is the benefit of using
these Systemxxx classes: you can be assured of getting objects that conform
to the user's theme, but it also means you can't rely on them to produce a
specific color. If you need that, just use the "regular" objects and specify
exactly what you need.