PDA

Click to See Complete Forum and Search --> : saving the image of a user control


Sparks
Jul 28th, 2000, 12:18 PM
I'm new to VB so please be patient.
I'm using Sam Huggil's GraphLite control in a test station program. I'd like to save the graph as an image file (any type). The control doesn't seem to have any image properties, so I put it inside a picture box and tried to use
SavePicture Picture1.Image <filename>
All I get is gray.
In my ignorance I also tried
SavePicture Picture1.Picture <filename>
and
Picture1.Picture = Picture1.Image
SavePicture Picture1.Picture <filname>
Still gray.
Does it just not work that way?
I suppose I could just take a screen shot of the whole window, but it would be neater if there was a way to just save the graph control's image. Is there?
And yes the data points are also saved to a file, and I could just recreate the graph, but my boss is like "Can we just save the graph from the test station?" So now I'm wondering if there's a way too.

kedaman
Jul 28th, 2000, 11:35 PM
Should be as easy as

Picture1.Picture = Picture1.Image 'Remove this if you have autoredraw
SavePicture Picture1.Picture, "C:\image.bmp"