2021-05-21 仓库温控系统(Winform) 15 扩展控件-IconButton
Posted 微软MVP Eleven
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了2021-05-21 仓库温控系统(Winform) 15 扩展控件-IconButton相关的知识,希望对你有一定的参考价值。
public partial class UIconButton : Button
{
public UIconButton()
{
InitializeComponent();
//尺寸 字体 字号 FlatStyle FlatAppearance ForeColor
this.Size = new Size(30, 30);
this.Font = new Font("Webdings", 10.8F);
this.FlatStyle = FlatStyle.Flat;
this.FlatAppearance.BorderSize = 0;
this.Text = "0";
this.ForeColor = Color.Silver;
this.BackColor = Color.Transparent;
}
protected override void OnMouseEnter(EventArgs e)
{
base.OnMouseEnter(e);
this.BackColor = Color.FromArgb(53, 61, 134);
}
protected override void OnMouseLeave(EventArgs e)
{
base.OnMouseLeave(e);
this.BackColor = Color.Transparent;
}
/// <summary>
/// 不显示聚焦框
/// </summary>
protected override bool ShowFocusCues
{
get { return false; }
}
}
以上是关于2021-05-21 仓库温控系统(Winform) 15 扩展控件-IconButton的主要内容,如果未能解决你的问题,请参考以下文章
2021-05-21 仓库温控系统(Winform) 19 窗体拖动功能实现
2021-05-21 仓库温控系统(Winform) 17 定时器的使用
2021-05-21 仓库温控系统(Winform) 05 获取类属性静态方法PropertyHelper
2021-05-21 仓库温控系统(Winform) 18 封装Panel中显示Form页方法