View Full Version : Saving OpenGL scene from a VB PictureBox.hdc

03-27-2002, 12:49 AM

I am not entirly sure what I am doing but I have an OpenGL scene rendered in a VB PicturebBox. What I want to do is save the image as a BMP to a file. How do I do this?

Call SavePicture Picture1.Picture, "MyPicture.bmp")

The above code doesn't work.

Any Ideas?



03-27-2002, 05:36 AM
I recommend using the Image source dll from www.smalleranimals.com (http://www.smalleranimals.com) for doing this type of thing. Of course it costs a couple of bucks, but it is pretty powerful.

You could also get the RGB pixel info. Then learn a about the BMP file format and do it manually. There are many sources on the web that detail the BMP fiel format.

03-27-2002, 05:48 AM
Check out http://www.kather.net/VisualBasicSource/VBTips/98.txt

03-27-2002, 05:51 AM
Have tried simply using the line

Picture1.Picture = Picture1.Image

before calling the SavePicture method?

Just a thought...