商务合作:179001057@qq.com

winform中datagridview 中checkbox双击后 AfterCheck事件只触发一次的解决方式

xiaoxiao2021-09-21  45

protected override void WndProc(ref Message m) { if (m.Msg == WM_LBUTTONDBLCLK) { Point p = new Point((int)m.LParam); HitTestInfo tvhti = HitTest(p.X, p.Y); m.Result = IntPtr.Zero; return; //if (tvhti != null && tvhti.Location == TreeViewHitTestLocations.StateImage) //{ // m.Result = IntPtr.Zero; // return; //} } else if (m.Msg == WM_RBUTTONDOWN) { Point p = new Point((int)m.LParam); HitTestInfo tvhti = HitTest(p.X, p.Y); //if (tvhti != null) // SelectedNode = tvhti.Node; } base.WndProc(ref m); }

 

商务合作:179001057@qq.com

CopyRight © 2010-至今 All Rights Reserved
Processed: 0.018, SQL: 9