自己写的程序生成解决方案时无错无警告,也可以运行,但是点击一个button时出错,高潮是这个程序可以在别人的机子上正常运行,不会出现这种情况,写了一下引用
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Drawing.Imaging;
个人认为是在这个using System.Drawing.Imaging;上出现问题了求大侠指教怎么解决啊,下面是具体错误,小弟在此拜谢有关调用实时(JIT)调试而不是此对话框的详细信息,
请参见此消息的结尾。************** 异常文本 **************
System.ArgumentException: 参数无效。
   在 System.Drawing.Bitmap.LockBits(Rectangle rect, ImageLockMode flags, PixelFormat format, BitmapData bitmapData)
   在 System.Drawing.Bitmap.LockBits(Rectangle rect, ImageLockMode flags, PixelFormat format)
   在 LK相关系数.Form1.CovCal(Bitmap map1, Bitmap map2) 位置 E:\大三上\图像处理与分析\LK相关系数\LK相关系数\Form1.cs:行号 47
   在 LK相关系数.Form1.button3_Click(Object sender, EventArgs e) 位置 E:\大三上\图像处理与分析\LK相关系数\LK相关系数\Form1.cs:行号 97
   在 System.Windows.Forms.Control.OnClick(EventArgs e)
   在 System.Windows.Forms.Button.OnClick(EventArgs e)
   在 System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
   在 System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   在 System.Windows.Forms.Control.WndProc(Message& m)
   在 System.Windows.Forms.ButtonBase.WndProc(Message& m)
   在 System.Windows.Forms.Button.WndProc(Message& m)
   在 System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   在 System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   在 System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
************** 已加载的程序集 **************
mscorlib
    程序集版本: 2.0.0.0
    Win32 版本: 2.0.50727.42 (RTM.050727-4200)
    基本代码: file:///C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
LK相关系数
    程序集版本: 1.0.0.0
    Win32 版本: 1.0.0.0
    基本代码: file:///E:/大三上/图像处理与分析/LK相关系数/LK相关系数/bin/Debug/LK相关系数.exe
----------------------------------------
System.Windows.Forms
    程序集版本: 2.0.0.0
    Win32 版本: 2.0.50727.42 (RTM.050727-4200)
    基本代码: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System
    程序集版本: 2.0.0.0
    Win32 版本: 2.0.50727.42 (RTM.050727-4200)
    基本代码: file:///C:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Drawing
    程序集版本: 2.0.0.0
    Win32 版本: 2.0.50727.42 (RTM.050727-4200)
    基本代码: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System.Configuration
    程序集版本: 2.0.0.0
    Win32 版本: 2.0.50727.42 (RTM.050727-4200)
    基本代码: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Configuration/2.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.Xml
    程序集版本: 2.0.0.0
    Win32 版本: 2.0.50727.42 (RTM.050727-4200)
    基本代码: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
System.Windows.Forms.resources
    程序集版本: 2.0.0.0
    Win32 版本: 2.0.50727.42 (RTM.050727-4200)
    基本代码: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Windows.Forms.resources/2.0.0.0_zh-CHS_b77a5c561934e089/System.Windows.Forms.resources.dll
----------------------------------------
System.Data
    程序集版本: 2.0.0.0
    Win32 版本: 2.0.50727.42 (RTM.050727-4200)
    基本代码: file:///C:/WINDOWS/assembly/GAC_32/System.Data/2.0.0.0__b77a5c561934e089/System.Data.dll
----------------------------------------
System.Drawing.resources
    程序集版本: 2.0.0.0
    Win32 版本: 2.0.50727.42 (RTM.050727-4200)
    基本代码: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Drawing.resources/2.0.0.0_zh-CHS_b03f5f7f11d50a3a/System.Drawing.resources.dll
----------------------------------------
mscorlib.resources
    程序集版本: 2.0.0.0
    Win32 版本: 2.0.50727.42 (RTM.050727-4200)
    基本代码: file:///C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------************** JIT 调试 **************
要启用实时(JIT)调试,
该应用程序或计算机的 .config 文件(machine.config)的 system.windows.forms 节中必须设置
jitDebugging 值。
编译应用程序时还必须启用
调试。例如: <configuration>
    <system.windows.forms jitDebugging="true" />
</configuration>启用 JIT 调试后,任何无法处理的异常
都将被发送到在此计算机上注册的 JIT 调试器,
而不是由此对话框处理。

解决方案 »

  1.   

    System.ArgumentException: 参数无效。
      在 System.Drawing.Bitmap.LockBits(Rectangle rect, ImageLockMode flags, PixelFormat format, BitmapData bitmapData)这不是有报错信息么  你参数传的不对吧  LockBits检查参数看看呢
      

  2.   

    到底是在谁的机器上出错、
    设置一下页面的设置了<%@page enableeventvalidation = "false" %>为false
      

  3.   

    在我的机子上有错,在别人的机子上没事无语了都,没有报错,也没有警告,开始可以运行,就是button一点就出错,各位大侠啊帮帮忙吧,加下扣吧858489903