menghuanyunxia 发表于 2014-8-11 16:53:00

【WinForms】导入 Excel 图片和原图片不同

你好,请问重现了没有?

menghuanyunxia 发表于 2014-8-11 17:15:00

exe文件

编译之后的exe文件,无dll

menghuanyunxia 发表于 2014-8-11 17:21:00

点击open excel

点击save execel之后,打击open excel 图片显示成如下

menghuanyunxia 发表于 2014-8-11 17:22:00

点击拖动该图片,报错如下ee the end of this message for details on invoking
just-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.

menghuanyunxia 发表于 2014-8-11 17:24:00

我们安装的是win7旗舰版

iceman 发表于 2014-8-11 18:05:00

回复 42楼menghuanyunxia的帖子

我这边计划模拟你的环境进行测试,明天反馈给你进一步结果。感谢你的配合

menghuanyunxia 发表于 2014-8-11 20:02:00

生成的错误文件

生成的文件无法打开

menghuanyunxia 发表于 2014-8-12 11:17:00

我们这边使用的是vs2010

menghuanyunxia 发表于 2014-8-12 11:45:00

win7专业版确实可以,旗舰版就会出错,请用旗舰版进行测试

iceman 发表于 2014-8-12 11:46:00

回复 46楼menghuanyunxia的帖子

好的,我测试后通知你结果。
页: [1] 2 3 4 5 6
查看完整版本: 【WinForms】导入 Excel 图片和原图片不同