当前位置:编程学习 > C#/ASP.NET >>

Datagridview的BUG?

//以下Exception一直无从下手捕捉,请教各路高手。
//只要启用了DATAGRIDVIEW的ShowCellToolTips=True,按Esc键退出窗口(窗体的CacelButton指定某一Button,该Button的Click事件只有一句"this.Close();")便会出现以下Exception

System.InvalidOperationException: Window handle already exists.
   at System.Windows.Forms.NativeWindow.CheckReleased()
   at System.Windows.Forms.NativeWindow.CreateHandle(CreateParams cp)
   at System.Windows.Forms.ToolTip.CreateHandle()
   at System.Windows.Forms.ToolTip.Hide(IWin32Window win)
   at System.Windows.Forms.DataGridView.DataGridViewToolTip.Activate(Boolean activate)
   at System.Windows.Forms.DataGridView.OnMouseLeave(EventArgs e)
   at System.Windows.Forms.Control.WmMouseLeave(Message& m)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.DataGridView.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.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
   at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
   at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
   at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
   at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
   at System.Windows.Forms.Application.Run(Form mainForm)
   at ANDY.Program.Main(String[] args) in D:\Projects\ABC\Program.cs:line 33 --------------------编程问答-------------------- 那就不启用了罢. --------------------编程问答-------------------- 必需用到。难道仙人要做到

吃饭 》牙痛

为了不牙痛,所以不吃饭

补充:.NET技术 ,  C#
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,