tabControl选项卡绘制关闭按钮非继承方式.rar

上传者: yzzgz | 上传时间: 2021-08-18 18:00:42 | 文件大小: 51KB | 文件类型: RAR
说明: 程序开发总是坚持依最简单的方式,最少的代码达到我们想要的目的; 部分功能参考了网络上一些公开的写法,喝水不忘挖井人,在此感谢那些挖井的人; 我也公开我的成果,给予后来的学习者一个参考,注释非常详细,方便学习者便于理解; 坚持使用c#原生控件,不用单独写类或用继承之类的技术,不增加额外属性; 通过tabControl控件本身自有的事件实现绘制关闭按钮; ---事件1:MouseMove(鼠标指针移过组件时发生:在标签上绘制一个关闭按钮) ------实现此功能的关键在于:由于MouseMove事件没有包含Graphics(图形)对象的定义; ------所以我们要达到绘制目的就必须在此事件里面为tabControl控件创建一个Graphics(图形)对象; ------后面的功能实现就非常简单了; ---事件2:MouseDown(当鼠标指针在组件上方按下鼠标按钮时发生:实现关闭选项卡功能)。

文件下载

资源详情

[{"title":"( 25 个子文件 51KB ) tabControl选项卡绘制关闭按钮非继承方式.rar","children":[{"title":"tabControl选项卡绘制关闭按钮非继承方式","children":[{"title":"Form1.Designer.cs <span style='color:#111;'> 10.60KB </span>","children":null,"spread":false},{"title":"Program.cs <span style='color:#111;'> 533B </span>","children":null,"spread":false},{"title":"obj","children":[{"title":"Debug","children":[{"title":"tabControl选项卡绘制关闭按钮非继承方式.Properties.Resources.resources <span style='color:#111;'> 180B </span>","children":null,"spread":false},{"title":"tabControl选项卡绘制关闭按钮非继承方式.pdb <span style='color:#111;'> 43.50KB </span>","children":null,"spread":false},{"title":"tabControl选项卡绘制关闭按钮非继承方式.csproj.FileListAbsolute.txt <span style='color:#111;'> 4.40KB </span>","children":null,"spread":false},{"title":"DesignTimeResolveAssemblyReferencesInput.cache <span style='color:#111;'> 7.07KB </span>","children":null,"spread":false},{"title":"tabControl选项卡绘制关闭按钮非继承方式.csproj.GenerateResource.cache <span style='color:#111;'> 1012B </span>","children":null,"spread":false},{"title":"tabControl选项卡绘制关闭按钮非继承方式.exe <span style='color:#111;'> 15.50KB </span>","children":null,"spread":false},{"title":"TempPE","children":null,"spread":false},{"title":"tabControl选项卡绘制关闭按钮非继承方式.Form1.resources <span style='color:#111;'> 180B </span>","children":null,"spread":false},{"title":".NETFramework,Version=v4.0.AssemblyAttributes.cs <span style='color:#111;'> 208B </span>","children":null,"spread":false},{"title":"DesignTimeResolveAssemblyReferences.cache <span style='color:#111;'> 1.39KB </span>","children":null,"spread":false},{"title":"tabControl选项卡绘制关闭按钮非继承方式.csprojAssemblyReference.cache <span style='color:#111;'> 2.15KB </span>","children":null,"spread":false},{"title":"tabControl选项卡绘制关闭按钮非继承方式.csproj.CoreCompileInputs.cache <span style='color:#111;'> 42B </span>","children":null,"spread":false}],"spread":false}],"spread":true},{"title":"bin","children":[{"title":"Debug","children":[{"title":"tabControl选项卡绘制关闭按钮非继承方式.pdb <span style='color:#111;'> 43.50KB </span>","children":null,"spread":false},{"title":"tabControl选项卡绘制关闭按钮非继承方式.exe <span style='color:#111;'> 15.50KB </span>","children":null,"spread":false}],"spread":true}],"spread":true},{"title":"Form1.cs <span style='color:#111;'> 16.69KB </span>","children":null,"spread":false},{"title":".vs","children":[{"title":"tabControl选项卡绘制关闭按钮非继承方式","children":[{"title":"v16","children":[{"title":".suo <span style='color:#111;'> 58.50KB </span>","children":null,"spread":false}],"spread":true}],"spread":true}],"spread":true},{"title":"Form1.resx <span style='color:#111;'> 5.88KB </span>","children":null,"spread":false},{"title":"tabControl选项卡绘制关闭按钮非继承方式.sln <span style='color:#111;'> 1.18KB </span>","children":null,"spread":false},{"title":"tabControl选项卡绘制关闭按钮非继承方式.csproj <span style='color:#111;'> 3.43KB </span>","children":null,"spread":false},{"title":"Properties","children":[{"title":"AssemblyInfo.cs <span style='color:#111;'> 1.38KB </span>","children":null,"spread":false},{"title":"Settings.Designer.cs <span style='color:#111;'> 1.11KB </span>","children":null,"spread":false},{"title":"Resources.resx <span style='color:#111;'> 5.48KB </span>","children":null,"spread":false},{"title":"Settings.settings <span style='color:#111;'> 249B </span>","children":null,"spread":false},{"title":"Resources.Designer.cs <span style='color:#111;'> 2.87KB </span>","children":null,"spread":false}],"spread":true}],"spread":true}],"spread":true}]

评论信息

免责申明

【只为小站】的资源来自网友分享,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,【只为小站】 无法对用户传输的作品、信息、内容的权属或合法性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论 【只为小站】 经营者是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。
本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二条之规定,若资源存在侵权或相关问题请联系本站客服人员,zhiweidada#qq.com,请把#换成@,本站将给予最大的支持与配合,做到及时反馈和处理。关于更多版权及免责申明参见 版权及免责申明