【WinForms】导入 Excel 图片和原图片不同
你好,请问重现了没有?exe文件
编译之后的exe文件,无dll点击open excel
点击save execel之后,打击open excel 图片显示成如下 点击拖动该图片,报错如下ee the end of this message for details on invokingjust-in-time (JIT) debugging instead of this dialog box.
************** Exception Text **************
System.Exception: 异常在FpSpread.WndProc中处理 ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Runtime.InteropServices.ExternalException: A generic error occurred in GDI+.
at System.Drawing.Image.Save(Stream stream, ImageCodecInfo encoder, EncoderParameters encoderParams)
at System.Drawing.Image.Save(Stream stream, ImageFormat format)
at FarPoint.Win.Serializer.a(Image A_0, String A_1, XmlWriter A_2)
at FarPoint.Win.Picture.Serialize(XmlTextWriter w)
--- End of inner exception stack trace ---
at System.RuntimeMethodHandle._InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeType typeOwner)
at System.RuntimeMethodHandle.InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeType typeOwner)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at System.RuntimeType.InvokeMember(String name, BindingFlags bindingFlags, Binder binder, Object target, Object[] providedArgs, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParams)
at FarPoint.Win.Serializer.a(Object A_0, Type A_1, String A_2, XmlWriter A_3, Assembly A_4, Object[] A_5, Boolean A_6, Boolean A_7)
at FarPoint.Win.Serializer.SerializeObjectInternal(Object o, String elementName, XmlWriter w, Boolean saveVersion)
at FarPoint.Win.Spread.DrawingSpace.PSObject.SerializeProps(XmlTextWriter w)
at FarPoint.Win.Spread.DrawingSpace.PSShape.SerializeProps(XmlTextWriter w)
at FarPoint.Win.Spread.DrawingSpace.PSShape.Serialize(Object obj, XmlTextWriter w)
at FarPoint.Win.Spread.DrawingSpace.PSShape.Serialize(XmlTextWriter w)
--- End of inner exception stack trace ---
at System.RuntimeMethodHandle._InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeType typeOwner)
at System.RuntimeMethodHandle.InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeType typeOwner)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at System.RuntimeType.InvokeMember(String name, BindingFlags bindingFlags, Binder binder, Object target, Object[] providedArgs, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParams)
at FarPoint.Win.Serializer.a(Object A_0, Type A_1, String A_2, XmlWriter A_3, Assembly A_4, Object[] A_5, Boolean A_6, Boolean A_7)
at FarPoint.Win.Serializer.GetObjectXml(ISerializeSupport o, String elementName, Assembly callingAssembly)
at FarPoint.Win.Serializer.GetObjectXml(ISerializeSupport o, String elementName)
at FarPoint.Win.Spread.UndoRedo.ChildChangeUndoAction.SaveUndoState()
at FarPoint.Win.Spread.UndoRedo.ChildChangeUndoAction..ctor(SheetView sheetView, ElementWindowless shape, Boolean attachUIChangeCompleteHandler)
at FarPoint.Win.Spread.SpreadView.a(Int32 A_0, Int32 A_1, MouseEventArgs A_2)
at FarPoint.Win.Spread.SpreadView.g(MouseEventArgs A_0)
at FarPoint.Win.Spread.FpSpread.OnMouseDown(MouseEventArgs e)
at System.Windows.Forms.Control.WmMouseDown(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at FarPoint.Win.Spread.FpSpread.WndProc(Message& m)
--- End of inner exception stack trace ---
at FarPoint.Win.Spread.FpSpread.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
************** Loaded Assemblies **************
mscorlib
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.296 (RTMGDR.030319-2900)
CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll
----------------------------------------
12617_3
Assembly Version: 1.0.0.0
Win32 Version: 1.0.0.0
CodeBase: file:///C:/Users/superman/Desktop/12617_3/12617_3/bin/Debug/12617_3.exe
----------------------------------------
System.Windows.Forms
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.278 built by: RTMGDR
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System.Drawing
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.282 built by: RTMGDR
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.296 built by: RTMGDR
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Configuration
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.1 (RTMRel.030319-0100)
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.Xml
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.276 built by: RTMGDR
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
FarPoint.Win.Spread
Assembly Version: 7.35.20142.0
Win32 Version: 7.35.20142.0
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/FarPoint.Win.Spread/7.35.20142.0__327c3516b1b18457/FarPoint.Win.Spread.dll
----------------------------------------
System.Core
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.225 built by: RTMGDR
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll
----------------------------------------
FarPoint.Win
Assembly Version: 7.35.20142.0
Win32 Version: 7.35.20142.0
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/FarPoint.Win/7.35.20142.0__327c3516b1b18457/FarPoint.Win.dll
----------------------------------------
System.Data
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.276 (RTMGDR.030319-2700)
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_32/System.Data/v4.0_4.0.0.0__b77a5c561934e089/System.Data.dll
----------------------------------------
FarPoint.CalcEngine
Assembly Version: 7.35.20142.0
Win32 Version: 7.35.20142.0
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/FarPoint.CalcEngine/7.35.20142.0__327c3516b1b18457/FarPoint.CalcEngine.dll
----------------------------------------
FarPoint.Localization
Assembly Version: 7.20.20142.0
Win32 Version: 7.20.20142.0
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/FarPoint.Localization/7.20.20142.0__327c3516b1b18457/FarPoint.Localization.dll
----------------------------------------
FarPoint.Excel
Assembly Version: 7.35.20142.0
Win32 Version: 7.35.20142.0
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/FarPoint.Excel/7.35.20142.0__327c3516b1b18457/FarPoint.Excel.dll
----------------------------------------
FarPoint.Win.Chart
Assembly Version: 7.35.20142.0
Win32 Version: 7.35.20142.0
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/FarPoint.Win.Chart/7.35.20142.0__327c3516b1b18457/FarPoint.Win.Chart.dll
----------------------------------------
FarPoint.Win.Spread.resources
Assembly Version: 7.35.20142.0
Win32 Version: 7.35.20142.0
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/FarPoint.Win.Spread.resources/7.35.20142.0_zh-CN_327c3516b1b18457/FarPoint.Win.Spread.resources.dll
----------------------------------------
************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.
For example:
<configuration>
<system.windows.forms jitDebugging="true" />
</configuration>
When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box. 我们安装的是win7旗舰版 回复 42楼menghuanyunxia的帖子
我这边计划模拟你的环境进行测试,明天反馈给你进一步结果。感谢你的配合
生成的错误文件
生成的文件无法打开 我们这边使用的是vs2010 win7专业版确实可以,旗舰版就会出错,请用旗舰版进行测试 回复 46楼menghuanyunxia的帖子好的,我测试后通知你结果。