Application #85. Work with GDI+ Pens
This sample demonstrates most of the features available when using the GDI+ Pen object, which you use to draw lines and shapes. In succeeding samples, we’ll look at working with brushes, text, images, screen savers, and animation.
Application #1: Use Arrays
Application #29: Use the ListBox and ComboBox
To draw lines or curves, you need two objects: a Graphics object and a Pen object. The Graphics object has methods such as DrawLine, DrawEllipse, DrawRectangle, and others. A Graphics object is always associated with a specific object—such as a form or a PictureBox—that you can think of as the canvas on which it draws. You can think of the Graphics object as something like your ...