CopyToClipboard produces error
Posted: Tue Aug 04, 2009 11:01 pm
I am porting Delphi code to WPF/C#.
My delphi code to copy an image to the clipboard was:
FChartTimeSeries.ChartDisplay.BufferedDisplay = False;
FChartTimeSeries.ChartDisplay.CopyToClipboardBitmap;
FChartTimeSeries.ChartDisplay.BufferedDisplay = True;
I replaced this with the following C# code:
FChartTimeSeries.ChartDisplay.Export.Image.Bitmap.CopyToClipboard();
I get the following error:
No imaging component suitable to complete this operation was found.
If instead I use the code:
FChartTimeSeries.ChartDisplay.Export.Image.JPEG.CopyToClipboard();
I get the following error:
The image cannot be decoded. The image header might be corrupted.
What is the correct way to copy the current TeeChart image to the clipboard?
Thanks,
Kent
My delphi code to copy an image to the clipboard was:
FChartTimeSeries.ChartDisplay.BufferedDisplay = False;
FChartTimeSeries.ChartDisplay.CopyToClipboardBitmap;
FChartTimeSeries.ChartDisplay.BufferedDisplay = True;
I replaced this with the following C# code:
FChartTimeSeries.ChartDisplay.Export.Image.Bitmap.CopyToClipboard();
I get the following error:
No imaging component suitable to complete this operation was found.
If instead I use the code:
FChartTimeSeries.ChartDisplay.Export.Image.JPEG.CopyToClipboard();
I get the following error:
The image cannot be decoded. The image header might be corrupted.
What is the correct way to copy the current TeeChart image to the clipboard?
Thanks,
Kent