We have learned how to create the Graphics and the Pen objects to draw straight lines in the previous lesson. Now we shall learn how to draw rectangle, square,ellipse and circle.
To draw a rectangle on the screen in VB2008, there are two ways: (i)The first way is to draw a rectangle directly using the DrawRectangle method by specifying its upper-left corner's coordinates and its width and height. You also need to create a Graphics and a Pen object to handle the actual drawing. The method to draw the rectangle is DrawRectangle .
The syntax is:
myGrapphics.DrawRectangle(myPen, X, Y, width, height)
To learn the details, we suggest you grab a copy of Visual Basic 2008 Made Easy.
AUTHOR: DR. LIEW VOON KIONG
VISUAL BASIC 2008 MADE EASY is an eBook written by our webmaster, Dr.Liew to complement our Online Visual Basic 2008 Tutorial. It has more contents than the free online tutorial.
By reading this book, you can:
*Please wait for 10 seconds for PayPal to redirect you to E-book Download Page after ordering and making payment.
Mode of Delivery: Download
This site and the products and services offered on this site are not associated, affiliated, endorsed, or sponsored by Microsoft, nor have they been reviewed tested or certified by Microsoft.