| |
 |
|
| .NET DotNet Forum Index » VB.NET Forum (Visual Basic .NET) » MsChart error message in VB 2005 |
|
Page 1 of 1 |
|
| Author |
Message |
| steve |
Posted: Sat Apr 15, 2006 9:55 pm |
|
|
|
Guest
|
Using Mschart in VB.net 2005
I get the error 'System.ExecutionEngineException' when I run the print code
below..
The Graph display data OK on the form
code..................................................................
My.Computer.Clipboard.Clear()
MSChart1.EditCopy()
If My.Computer.Clipboard.GetDataObject.GetDataPresent(DataFormats.Bitmap)
Then ******** get error here
bmpGraph =
System.Windows.Forms.Clipboard.GetDataObject.GetData(System.Windows.Forms.DataFormats.Bitmap)
End If
drawFormat.FormatFlags = StringFormatFlags.NoWrap
' Draw string to screen.
e.Graphics.DrawString(lbltitle.Text, drawFont, drawBrush, _
x, y, drawFormat)
e.Graphics.DrawImage(bmpGraph, 100, 100, 1000, 550)
.....................................................................................................
Any ideas
Regards
steve |
|
|
| Back to top |
|
|
|
| Luke Zhang [MSFT] |
Posted: Mon Apr 17, 2006 2:34 am |
|
|
|
Guest
|
Hello Steve,
I also got an exception with following code:
AxMSChart1.EditCopy()
MsgBox(My.Computer.Clipboard.ContainsImage)
MSChart1 is an COM component. The image it copied also in COM format. It
seems that the image data cannot be used in .NET managed code.
I think there two work arounds:
1. User Chart control in MS Office.
2. In VB 6.0 or VC 6.0, create a user control with MSchart control in it
and implement the print function in the user control, and use this control
in .NET framework.
Regards,
Luke Zhang
Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================
(This posting is provided "AS IS", with no warranties, and confers no
rights.) |
|
|
| Back to top |
|
|
|
|
|
All times are GMT - 5 Hours
The time now is Sun Nov 08, 2009 12:53 am
|
|