Page 1 of 1

Unwanted blue border

Posted: Tue Apr 08, 2008 9:38 am
by 13048751
I program in VB.NET using VS2008. I use Tchart for Net V3 (version March 2008) to create graphics images. As seen in
http://tonheuv.speed.planet.nl/teechart.doc a blue border around the chart appears when I paste a clipboard copy (of a wmf file read from disk) into a word document. Anybody any ideas to get rid of the blue border? Thanks!

Posted: Tue Apr 08, 2008 10:04 am
by narcis
Hi Ton,

Thanks for the information.

This seems a bug to me and I've added it (TF02012951) to our defect list to be fixed for next releases.
// MetaFile.CopyToClipboard() 'does nothing, march 2008
Yes, this is also a known issue with MetaFile, you can find more information about it here:

http://www.teechart.net/support/viewtopic.php?t=3682

Posted: Tue Apr 08, 2008 10:17 am
by 13048751
Can I take this as: There is no solution?

Posted: Tue Apr 08, 2008 10:39 am
by narcis
Hi Ton,

For TF02012951 no, we include a number of bug fixes on each maintenace release as you can see in the release notes.

Regarding the CopyToClipboard issue, yes, there's no solution without going unmanaged. We don't have plans for that at the moment.

Posted: Thu Apr 17, 2008 1:53 pm
by narcis
Hi Ton,

As an update to the issues described on this thread, the code you sent has two problems:

1. It uses the deprecated property Enhanced (or rather the field associated with it, bEnhanced). The EMFFormat property should be used instead, for example:

Code: Select all

			Steema.TeeChart.Export.MetafileFormat MetaFile = tChart1.Export.Image.Metafile;

			MetaFile.Height = tChart1.Height;
			MetaFile.Width = tChart1.Width;
			MetaFile.CopyToClipboard();
			MetaFile.EMFFormat = System.Drawing.Imaging.EmfType.EmfOnly;
			MetaFile.Save(@"c:\temp\myTChart.emf");
BTW: .NET only supports EMF files and does not support WMF files.

2. When you copy the file from disk you load it as a Bitmap and not as a Metafile. Metafiles cannot be copied to the clipboard using .NET classes/methods. However, we fixed teechart's MetaFile.CopyToClipboard method but the fix will only work fine in x86 CPU machines as the solution involves using pinvoke to a x86 specific dll.

unwanted blue border

Posted: Fri Apr 18, 2008 7:53 am
by 13048751
Thanks NarcĂ­s, I will give it a try shortly.

unwanted blue border

Posted: Fri Apr 18, 2008 10:41 am
by 13048751
Unfortunately I did not manage to get it to work (yes, I installed latest version of the TeeChart .NET v3 softeware). MetaFile.CopyToClipboard() still does nothing.

Posted: Fri Apr 18, 2008 10:44 am
by narcis
Hi Ton,

Sorry if I didn't explain myself. The fix is not available in the current release, it will be included in the next maintenance release due to be out on early May.

Posted: Fri Apr 18, 2008 10:55 am
by 13048751
Ok, I see. Then I will wait untill May (I'm in no hurry). Thanks!

June 3; installed newest teechart v3 software: still no joy.
Narcis, Could you provide a working example?