Measurement Studio for VB6

cancel
Showing results for 
Search instead for 
Did you mean: 

SAve Graph control as bitmap image

Hi,

I couldn't help but notice that when you save the ControlImage, it saves it as a windows metafile even if you give it a BMP extension.  Is there anyway to save images as just BMP format?
0 Kudos
Message 11 of 13
(4,806 Views)
I have the same problem in that the image generated by the ControlImageEx method is an enhanced windows metafile. None of the third party tools I have support emf files. Is there some way that this control can save as a BMP format?  I'd rather not have to purchase new image processing tools just to handle the output of this control.
0 Kudos
Message 12 of 13
(4,344 Views)
David,

I was able to find this forum post (which discusses this in VC++) and the way you would convert this metafile into a bitmap. The post to pay attention to is the fourth post (by Elton Wells). This discusses the exact way you would do this (though the example code is C++). The main point is to use the PlayEnhMetaFile function. This will allow you to convert to bitmap. For more on this function, you can also visit the following link.

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/gdi/metafile_7hwl.asp

Brandon Vasquez | Software Engineer | Integration Services | National Instruments
0 Kudos
Message 13 of 13
(4,329 Views)