girish_d1 Posted July 14, 2003 Posted July 14, 2003 Hi, I need to convert an MSChart object to either a BMP or JPEG file. I've tried converting the MSChart object to a Graphics object using the CreateGraphics() method of the MSChart object, but the bmp thus obtained is an all black image, though the file size is pretty large. Basically, I need to obtain the MSChart image in a MS Word(.doc) file, programmatically. Would appreciate any help... Thanx, -Girish. Quote
*Gurus* divil Posted July 14, 2003 *Gurus* Posted July 14, 2003 The MSChart control has a method which copies its graph to the clipboard as a windows metafile. You should be able to extract that metafile from the clipboard using .NET and save it using the Bitmap class's Save method. Quote MVP, Visual Developer - .NET Now you see why evil will always triumph - because good is dumb. My free .NET Windows Forms Controls and Articles
girish_d1 Posted July 14, 2003 Author Posted July 14, 2003 Thanx Divil, Apparently there's a bug in the .NET Framework which does not allow a Windows Metafile/Picture Property Image to the clipboard. It is acknowledged by MS also... http://support.microsoft.com/default.aspx?scid=kb;en-us;q316563. If there's any other way then would like to know about it. Thanx anyways... -Girish Quote
Recommended Posts