少有人走的路

勇哥的工业自动化技术网站

[netMarketing类库] 自定义组件colorfulButton (多彩按钮)

命名空间:UserUI

功能:自定义组件,多彩按钮


功能详细说明:

多彩按钮效果如下图所示,和普通按钮的区别主要是可以设置边框颜色,渐变色,以及鼠标划过后的颜色设定。

这个控件的基类是Button,因此它其实就是一个增加多彩显示的普通按钮对象。


image.png


image.png


引用netMarketing类库后,在“工具箱”,“所有windows窗体”中可以看到colorfulButton组件。

image.png


   public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void colorfulButton1_Click(object sender, EventArgs e)
        {
            MessageBox.Show($"{((Button)sender).Name}");
        }

        private void colorfulButton2_Click(object sender, EventArgs e)
        {
            MessageBox.Show($"{((Button)sender).Name}");
        }

        private void colorfulButton3_Click(object sender, EventArgs e)
        {
            MessageBox.Show($"{((Button)sender).Name}");
        }
    }


--------------------- 

作者:hackpig
来源:www.skcircle.com
版权声明:本文为博主原创文章,转载请附上博文链接!

返回类库功能说明目录


发表评论:

◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。

«    2025年11月    »
12
3456789
10111213141516
17181920212223
24252627282930
控制面板
您好,欢迎到访网站!
  查看权限
网站分类
搜索
最新留言
文章归档
网站收藏
友情链接

Powered By Z-BlogPHP 1.7.3

Copyright www.skcircle.com Rights Reserved.

鄂ICP备18008319号


站长QQ:496103864 微信:abc496103864