367 Star 3.1K Fork 868

dotNET China/DBCHM

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
TreeViewEnhanced.cs 682 Bytes
一键复制 编辑 原始数据 按行查看 历史
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace DBCHM
{
/// <summary>
/// 在使用treeview控件过程中会碰到,
/// 当快速点击checkbox时,checkbox选中状态和实际状态不符,并且不会触发aftercheck事件,
/// 造成此问题的原因是:快速点击识别为双击事件。
/// </summary>
public class TreeViewEnhanced : TreeView
{
protected override void WndProc(ref Message m)
{
if (m.Msg == 0x203) { m.Result = IntPtr.Zero; }
else base.WndProc(ref m);
}
}
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C#
1
https://gitee.com/dotnetchina/DBCHM.git
git@gitee.com:dotnetchina/DBCHM.git
dotnetchina
DBCHM
DBCHM
master

搜索帮助