the error is throws from the following line,"Property accessor 'TextRenderingHint' on object 'System.Drawing.Graphics' threw the following exception: 'Invalid parameter used.'
Code: Select all
tc.Export.Template.Save(memstream)
the error is throws from the following line,"Property accessor 'TextRenderingHint' on object 'System.Drawing.Graphics' threw the following exception: 'Invalid parameter used.'
Code: Select all
tc.Export.Template.Save(memstream)
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
Code: Select all
tc.Export.Template.Save(memstream)
************** Exception Text **************
System.Reflection.TargetInvocationException: Property accessor 'TextRenderingHint' on object 'System.Drawing.Graphics' threw the following exception:'Invalid parameter used.' ---> System.ArgumentException: Invalid parameter used.
at System.Drawing.Graphics.get_TextRenderingHint()
--- End of inner exception stack trace ---
at System.ComponentModel.ReflectPropertyDescriptor.GetValue(Object component)
at Steema.TeeChart.Export.TemplateExport.SerializeProperty(String Title, Object value, PropertyDescriptor i, SerializationInfo info)
at Steema.TeeChart.Export.TemplateExport.SerializeObject(String Prefix, Object value, SerializationInfo info)
at Steema.TeeChart.Export.TemplateExport.SerializeProperty(String Title, Object value, PropertyDescriptor i, SerializationInfo info)
at Steema.TeeChart.Export.TemplateExport.SerializeObject(String Prefix, Object value, SerializationInfo info)
at Steema.TeeChart.Export.TemplateExport.SerializeProperty(String Title, Object value, PropertyDescriptor i, SerializationInfo info)
at Steema.TeeChart.Export.TemplateExport.SerializeObject(String Prefix, Object value, SerializationInfo info)
at Steema.TeeChart.Export.TemplateExport.Serialize(SerializationInfo info, StreamingContext context)
at Steema.TeeChart.Chart.GetObjectData(SerializationInfo info, StreamingContext context)
at System.Runtime.Serialization.Formatters.Binary.WriteObjectInfo.InitSerialize(Object obj, ISurrogateSelector surrogateSelector, StreamingContext context, SerObjectInfoInit serObjectInfoInit, IFormatterConverter converter)
at System.Runtime.Serialization.Formatters.Binary.WriteObjectInfo.Serialize(Object obj, ISurrogateSelector surrogateSelector, StreamingContext context, SerObjectInfoInit serObjectInfoInit, IFormatterConverter converter)
at System.Runtime.Serialization.Formatters.Binary.ObjectWriter.Serialize(Object graph, Header[] inHeaders, __BinaryWriter serWriter, Boolean fCheck)
at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Serialize(Stream serializationStream, Object graph, Header[] headers, Boolean fCheck)
at Steema.TeeChart.Editors.Export.ExportEditor.checkBox3_CheckedChanged(Object sender, EventArgs e)
at System.Windows.Forms.CheckBox.OnCheckedChanged(EventArgs e)
at System.Windows.Forms.CheckBox.set_CheckState(CheckState value)
at System.Windows.Forms.CheckBox.OnClick(EventArgs e)
at System.Windows.Forms.CheckBox.OnMouseUp(MouseEventArgs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
************** Loaded Assemblies **************
mscorlib
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.2032
CodeBase: file:///c:/windows/microsoft.net/framework/v1.1.4322/mscorlib.dll
----------------------------------------
TeeChartNetExamples
Assembly Version: 2.0.2489.20950
Win32 Version: 2.0.2489.20950
CodeBase: file:///C:/Program%20Files/Steema%20Software/TeeChart%20for%20.NET%20v2/Examples/DemoProject/bin/ExecutableDemo/TeeChartNetExamples.exe
----------------------------------------
System.Windows.Forms
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.2032
CodeBase: file:///c:/windows/assembly/gac/system.windows.forms/1.0.5000.0__b77a5c561934e089/system.windows.forms.dll
----------------------------------------
System
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.2032
CodeBase: file:///c:/windows/assembly/gac/system/1.0.5000.0__b77a5c561934e089/system.dll
----------------------------------------
System.Drawing
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.2032
CodeBase: file:///c:/windows/assembly/gac/system.drawing/1.0.5000.0__b03f5f7f11d50a3a/system.drawing.dll
----------------------------------------
AxInterop.SHDocVw
Assembly Version: 1.1.0.0
Win32 Version: 1.1.0.0
CodeBase: file:///C:/Program%20Files/Steema%20Software/TeeChart%20for%20.NET%20v2/Examples/DemoProject/bin/ExecutableDemo/AxInterop.SHDocVw.DLL
----------------------------------------
Interop.SHDocVw
Assembly Version: 1.1.0.0
Win32 Version: 1.1.0.0
CodeBase: file:///C:/Program%20Files/Steema%20Software/TeeChart%20for%20.NET%20v2/Examples/DemoProject/bin/ExecutableDemo/Interop.SHDocVw.DLL
----------------------------------------
Accessibility
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.573
CodeBase: file:///c:/windows/assembly/gac/accessibility/1.0.5000.0__b03f5f7f11d50a3a/accessibility.dll
----------------------------------------
TeeChart
Assembly Version: 2.0.2489.20950
Win32 Version: 2.0.2489.20950
CodeBase: file:///C:/Program%20Files/Steema%20Software/TeeChart%20for%20.NET%20v2/Examples/DemoProject/bin/ExecutableDemo/TeeChart.DLL
----------------------------------------
System.Design
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.2032
CodeBase: file:///c:/windows/assembly/gac/system.design/1.0.5000.0__b03f5f7f11d50a3a/system.design.dll
----------------------------------------
System.Web
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.2037
CodeBase: file:///c:/windows/assembly/gac/system.web/1.0.5000.0__b03f5f7f11d50a3a/system.web.dll
----------------------------------------
System.Data
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.2032
CodeBase: file:///c:/windows/assembly/gac/system.data/1.0.5000.0__b77a5c561934e089/system.data.dll
----------------------------------------
System.Xml
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.2032
CodeBase: file:///c:/windows/assembly/gac/system.xml/1.0.5000.0__b77a5c561934e089/system.xml.dll
----------------------------------------
System.Drawing.Design
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.573
CodeBase: file:///c:/windows/assembly/gac/system.drawing.design/1.0.5000.0__b03f5f7f11d50a3a/system.drawing.design.dll
----------------------------------------
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
Code: Select all
private void Form1_Load(object sender, EventArgs e)
{
bar1.FillSampleValues();
}
private MemoryStream stream;
private void button1_Click(object sender, EventArgs e)
{
this.Enabled = false;
stream = new MemoryStream();
tChart1.Export.Template.Save(stream);
//tChart1.Clear();
}
private void button2_Click(object sender, EventArgs e)
{
stream.Position = 0;
tChart1.Import.Template.Load(stream);
}
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
Code: Select all
' break point 1
tc.Export.Template.Save(memstream)
m_chart.m_bTeeData = memstream.ToArray
' break point 2
memstream.Close()
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |