Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Create a bitmap 1

Status
Not open for further replies.

emergencyplan

Technical User
Aug 19, 2003
34
GB
Hello,

I have a program that reads an ASCII grid of altitudes and displays a coloured grid (depending on the altitude) in a picture box on the form, each grid square is drawn using picdisplay.line (x,y)-(x,y),vbColor,BF.

Is there a way of saving this picture box as a bitmap, I have experimented with savepicture picdisplay.image, "C:\Image.bmp" without success.

Thanks,

Laurence
 
Try this:

Picture1.Picture = Picture1.Image
SavePicture Picture1, "C:\whatever.bmp"
 
or just:

SavePicture Picture1.image, "C:\whatever.bmp"
 
Set AutoRedraw to True before drawing your picture; that way it'll be rendered into the persitant bitmap represented by the Image property. Once that's done, voila! savepicture picdisplay.image, "C:\Image.bmp" should work as expected.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top