Working With The SavePicture Function

Why do I need SavePicture when I can’t change the picture loaded into the PictureBox anyways?

You can. Using Circle, Line, Pset and other drawing methods of the PictureBox control you can draw shapes to the client area of the PictureBox. You can also use PaintPicture to paint from another Form or PictureBox into another Form or PictureBox.

I used SavePicture and the image wasn’t saved with my additional changes (using the previous question’s methods).

Make sure AutoRedraw = True, and when you call SavePicture, pass the Image Property of the PictureBox like so:

SavePicture Picture1.Image, sFile

The Picture property used here will save the originally loaded picture (using LoadPicture method) but the Image property will include additional changes made through VB drawing methods etc.

 

Tip Submitted By: Michele Leroux