Page 1 of 1

CopyToClipboardEnhMetafile

Posted: Fri Apr 18, 2008 8:15 am
by 9643352
Hi,

I am using the following code to copy a chart as an emf to the clipboard.

void CTeeChartDotNet2::CopyToClipboardEnhMetafile()
{
Steema::TeeChart::Export::MetafileFormat metaFile = mControl->Chart;
metaFile.bEnhanced = true;
metaFile.CopyToClipboard();
}

In version 2.0.2652.22325 it works perfect. With version 2.0.2987.19069 it produces none or corrupt clipboard contents.

What's wrong? Is there something missing? Is there a new interface?
Thanks

Sancho
:?

Posted: Fri Apr 18, 2008 8:29 am
by narcis
Hi Sancho,

Could you please have a look at this thread about the same issue?

In the meantime you could use something as what Ton suggested, for example:

Code: Select all

			Bitmap bmp = tChart1.Bitmap;			
			Clipboard.Clear();
			Clipboard.SetImage(bmp);
Thanks in advance.