//以下Exception一直无从下手捕捉,请教各路高手。
//只要启用了DATAGRIDVIEW的ShowCellToolTips=True,按Esc键退出窗口(窗体的CacelButton指定某一Button,该Button的Click事件只有一句"this.Close();")便会出现以下ExceptionSystem.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
//只要启用了DATAGRIDVIEW的ShowCellToolTips=True,按Esc键退出窗口(窗体的CacelButton指定某一Button,该Button的Click事件只有一句"this.Close();")便会出现以下ExceptionSystem.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
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货