请教大家一个问题,我们项目作了个系统,在平时运行的时候都很正常,什么问题都没有,但是在显示datagrid数据的时候,如果鼠标在datagrid上面随便点击,滚动datagrid滚动条的时候(可能在某种特定的情况下),有时候我鼠标在项目上点了10几分钟才会出现这种情况,有时候点个2-3分钟才会出现这种情况,不过不随便乱点,就不会出现下面的bug,但是用户反应有这种问题,我测了一上午,点了一上午终于也发现这个问题了,搞的为了调试每句代码都跟进,但是每次系统报错都直接跳转到
Application.SetCompatibleTextRenderingDefault(false);
Program.log.Error("跟踪系统启动记录:Application设置3"); frmM = new frmDefault();
Application.Run(frmM); --系统第一次登录的时候显示的窗体,但是在我报错的时候就是显示这句话错误。我跟进的代码是我报错的页面。这句话前后我也都设置了断点,但都没有作用直接调到这一句,前后都不执行。各位高手帮忙分析下。2009-12-15 17:12:43,140 [9] ERROR PlanBook.Program [(null)] <(null)> - System.ArgumentOutOfRangeException: “-41”的值对于“Value”无效。“Value”应介于 'minimum' 和 'maximum' 之间。
参数名: Value
在 System.Windows.Forms.ScrollBar.set_Value(Int32 value)
在 System.Windows.Forms.DataGridView.ScrollRows(Int32 rowCount, Int32 deltaY, ScrollEventType scrollEventType)
在 System.Windows.Forms.DataGridView.ScrollRowsByCount(Int32 rows, ScrollEventType scrollEventType)
在 System.Windows.Forms.DataGridView.OnMouseWheel(MouseEventArgs e)
在 System.Windows.Forms.Control.WmMouseWheel(Message& m)
在 System.Windows.Forms.Control.WndProc(Message& m)
在 System.Windows.Forms.DataGridView.WndProc(Message& m)
在 System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
在 System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
在 System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
在 System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
在 System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
在 System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
在 System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
在 System.Windows.Forms.Application.Run(Form mainForm)
在 PlanBook.Program.Main() 位置 D:\Project\PlanBook\FORM\PlanBook\Program.cs:行号 159
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货