当前路径:Cool.Windows.Forms/CoolFormTitleBar.cs using System; using System.Collections.Generic; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; namespace Cool.Windows.Forms { public class CoolFormTitleBar : Panel { public CoolFormTitleBar() { this.SetStyle( //ControlStyles.UserPaint |//使用自定义的绘制方式 ControlStyles.ResizeRedraw//当控件大小发生变化时就重新绘制 | ControlStyles.SupportsTransparentBackColor//则控件接受 alpha 组件数小于 255 个的 BackColor 来模拟透明度 | ControlStyles.AllPaintingInWmPaint//则控件忽略窗口消息 WM_ERASEBKGND 以减少闪烁 | ControlStyles.OptimizedDoubleBuffer//则控件将首先绘制到缓冲区而不是直接绘制到屏幕,这可以减少闪烁 , true); this.Size = new System.Drawing.Size(this.Width, 45); this.Dock = DockStyle.Top; this.BackColor = System.Drawing.ColorTranslator.FromHtml("#00a381"); _titleImage = Properties.Resources.Logo; _titleText = this.Name; RectanglePointInit(); } #region 属性 private Image _titleImage; [System.ComponentModel.Browsable(true)] public Image TitleImage { get => _titleImage; set { _titleImage = value; this.Invalidate(); } } private string _titleText = "酷玩创想(CoolDream)"; public string TitleText { get { return _titleText; } set { _titleText = value; this.Invalidate(); } } p...
完整源码文件,请先购买后再查看
相关源码
- 资产管理系统2023-09-16
- 雨田数据库表定时备份还原软件2023-09-13
- 订单管理系统(THINKPHP版)2023-09-10
- 校园失物招领2023-09-07
- 房哨(多中介管理运营平台系统) V2.0.4 学习版2023-08-05
- 企业级大屏可视化应用2023-06-29
关于我们 | 顾问团队 | 发展历程 | 联系我们 | 源码上传
联系电话(Tel):4008-010-151(免长途)
地址:北京市海淀区大恒科技大厦五层 邮编:100080
Floor 5th,Daheng Building,Zhongguancun,Beijing,China,100080
51Aspx.com 版权所有 CopyRight © 2006-2023. 京ICP备09089570号 | 京公网安备11010702000869号
联系电话(Tel):4008-010-151(免长途)
地址:北京市海淀区大恒科技大厦五层 邮编:100080
Floor 5th,Daheng Building,Zhongguancun,Beijing,China,100080
51Aspx.com 版权所有 CopyRight © 2006-2023. 京ICP备09089570号 | 京公网安备11010702000869号