17.6. Drawing Lines, Rectangles and Ovals

This section presents Graphics methods for drawing lines, rectangles and ovals. Each of the drawing methods has several overloaded versions. Methods that draw hollow shapes typically require as arguments a Pen and four ints. Methods that draw solid shapes typically require as arguments a Brush and four ints. The first two Integer arguments represent the coordinates of the upper-left corner of the shape (or its enclosing area), and the last two ints indicate the shape’s (or enclosing area’s) width and height. Figure 17.13 summarizes several Graphics methods and their parameters. [Note: Many of these methods are overloaded—consult the online Graphics class documentation for a complete listing (msdn2.microsoft.com/en-us/library/system.drawing.graphics ...

Get Visual Basic 2005 for Programmers: Deitel Developer Series, Second Edition 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.