Some more questions:
1. How to save the graphics in the picturebox to a file?
2. I used the following code:
Private Sub Command1_Click()
Printer.PaintPicture Picture1.Picture, 0, 0
and got "runtime error '481', invalid picture", because "An invalid
graphics format was assigned to the Picture property. This error has the
following cause and solution: You tried to assign a graphics format
other than a bitmap, icon, or Windows metafile to the Picture property
of a form or control.Ensure that the file you are trying to load into
the Picture property is a valid graphics file supported by Visual
> The most effective way to print out graphics that you've drawn into a
> picturebox is to re-draw them on the printer object. This produces a
> scalable, hi-resolution printout.
> Alternatively, you can use PaintPicture from the picturebox to the printer
> object, but that won't give you any better resolution than you have on the
> Jim Deutch
> MS Dev MVP
> > Steps to generate a simple application:
> > 1.Start a new project in Visual Basic. Form1 is created by
> > default.
> > 2.Place a Picture box on Form1. Picture1 is created by defaut.
> > 3.Place a Command control on Form1.
> > 4.Insert the following codes:
> > Private Sub Form_Load()
> > Picture1.Line (0, 0)-(5000, 5000), vbRed
> > End Sub
> > What is effective way to print out the graphic line in picturebox?
> > Thanks for help.
> > John Wong