I know of two ways:
- Using the .line, .circle, etc. methods
- Using bitblt
- PaintPicture (never used it; found it on google)
Are there any others?
What are the advantages to using a certain system over the other? (speed, anti-aliasing, etc.)
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Line and Circle are for vector graphics. Line draws lines, rectangles, and squares. Circles draws ellipses and circles. You can control whether these methods are outlined or filled, the line width, and the foreground an background colours.
BitBlt is an Win32 API call (not a built-in VB feature) which allows you to write a bitmap to a device context (which a PictureBox has). There are a number of different modes which allow you to interact the pixels of the background you are drawing onto with the pixels of the graphic).
The PaintPicture() method is essentially a COM wrapper around BitBlt, with bitmap handles being replaced by Picture objects.
There is also PSet, which simply draws a dot are the specified location on the screen. And I suppose you could also include Print, which allows you to draw text (which could potentially contain graphics fonts).
If you go to the Win32 API, there are a host of other graphics functions for drawing other shapes such as arcs, polygons, and bezier curves. However, they are generally more difficult to use than the built-in VB methods.
As for the advantages of ones over the others, it is basically: