473,385 Members | 1,465 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

MsChart error message in VB 2005

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.GetDa ta(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
Apr 16 '06 #1
1 2615
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.)

Apr 17 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Gerhard Swart | last post by:
Good Morning, I have a licensed .Net product. Meaning I can develop and deploy my projects. I want to use MSChart in my latest project. Now I am not sure about the licensing of MSChart. As far...
1
by: arc | last post by:
My web application is using MSChart for reporting. (until i port it to some decent reporting tool) How to make sure all the web clients (IE atleast) have MSChart on their system to view these...
5
by: Richard | last post by:
I don't know any thing about c#, I really need to do this in visual c++. I don't manually wrap the dll but since it's called AxInterop.OWC10.dll I assume visual studio has done that for me. ...
0
by: Richard | last post by:
When I try adding a MSChart control from the toolbox I get an error message telling me it can't find AxInterop.OWC10.dll. I was given the advice below but i'm not sure where to add the class...
1
by: wayne | last post by:
hi, i understand that i m able to use mschart to plot a line graph. i got list of values (jus one column) to b plotted into a line graph. how ca i do it using mschart in visual c++?? thanks...
2
by: John Blair | last post by:
Hi, In my webform HTML i have the following code, but i cannot view and configure this chart control in the code behind class. In the code behind class i have a reference to this com control...
0
by: JS | last post by:
Hello I want translate a project from VB6 to VB.Net 1.0 In this project I have a graph with a MsChart COM control. When I want make reference (Projet/Ref /Com controle) to this chart I have an...
1
by: SteveHasel | last post by:
I'm looking to dynamically create a series of charts in .NET using Visual Studio 2005 and attempt to export them to a document(either .pdf or .doc). I was attempting to use MSChart, but it turned out...
2
by: Just_a_fan | last post by:
I was working with MSChart, modifying one of the graphs and decided I wanted this particular chart to have an auto scale. I worked quite a while with it, uttered a few obscenities directed at the...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.