Saving OpenGL scene from a VB PictureBox.hdc

Hi

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?

Thanks

Simon

I recommend using the Image source dll from 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.

Check out http://www.kather.net/VisualBasicSource/VBTips/98.txt

Have tried simply using the line

Picture1.Picture = Picture1.Image

before calling the SavePicture method?

Just a thought…