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.
Building Upon...Application #1: Use Arrays Application #29: Use the ListBox and ComboBox |
New Concepts
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 ...
Get 101 Microsoft® Visual Basic® .NET Applications 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.