• 大小: 0.30M
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2021-03-27
  • 语言: C#
  • 标签: c#  

资源简介


windows标准的按钮总是给人呆板无趣的感觉,为了漂亮有个性的按钮,在C#中重新编写了继承于Button的位图按钮.

资源截图

代码片段和文件信息

using System;
using System.ComponentModel;
using System.Drawing;
using System.Windows.Forms;

namespace ExButton
{
    public enum ButtonStatus
    {
        Normal
        Hover
        Press
    }

    public partial class ExButton : Button
    {
        ButtonStatus m_ButtonState = ButtonStatus.Normal;
        public Image m_Image = Properties.Resources.Button;

        public ExButton()
        {
            InitializeComponent();

            m_Image = Properties.Resources.Button;
            if (m_Image != null)
            {
              //  Width = m_Image.Width / 3;
              //  Height = m_Image.Height;
            }
        }

        public ExButton(IContainer container)
        {
            container.Add(this);

            InitializeComponent();

            m_Image = Properties.Resources.Button;

            if (m_Image != null)
            {
              //  Width = m_Image.Width / 2;
               // Height = m_Image.

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2018-03-26 14:12  ExButton\
     目录           0  2018-03-26 15:05  ExButton\ExButton\
     文件         187  2018-03-26 14:12  ExButton\ExButton\App.config
     文件        1057  2018-03-26 14:33  ExButton\ExButton\ExButton.Designer.cs
     文件        4448  2018-03-27 07:47  ExButton\ExButton\ExButton.cs
     文件        4342  2018-03-27 08:01  ExButton\ExButton\ExButton.csproj
     文件        3404  2018-03-27 08:03  ExButton\ExButton\Form1.Designer.cs
     文件         580  2018-03-27 08:03  ExButton\ExButton\Form1.cs
     文件       35902  2018-03-27 08:03  ExButton\ExButton\Form1.resx
     文件         531  2018-03-26 14:12  ExButton\ExButton\Program.cs
     目录           0  2018-03-26 14:12  ExButton\ExButton\Properties\
     文件        1446  2018-03-26 14:12  ExButton\ExButton\Properties\AssemblyInfo.cs
     文件        4360  2018-03-27 08:01  ExButton\ExButton\Properties\Resources.Designer.cs
     文件        6940  2018-03-27 08:01  ExButton\ExButton\Properties\Resources.resx
     文件        1095  2018-03-26 14:12  ExButton\ExButton\Properties\Settings.Designer.cs
     文件         249  2018-03-26 14:12  ExButton\ExButton\Properties\Settings.settings
     目录           0  2018-03-27 08:00  ExButton\ExButton\Resources\
     文件       19856  2018-03-26 15:05  ExButton\ExButton\Resources\Button.bmp
     文件       43256  2018-03-27 08:00  ExButton\ExButton\Resources\Button3.bmp
     文件      178936  2018-03-26 18:06  ExButton\ExButton\Resources\button2.bmp
     文件      756056  2018-03-26 18:06  ExButton\ExButton\Resources\dialog_bk.bmp
     目录           0  2018-03-26 14:12  ExButton\ExButton\bin\
     目录           0  2018-03-26 14:13  ExButton\ExButton\bin\Debug\
     文件     1030656  2018-03-27 08:03  ExButton\ExButton\bin\Debug\ExButton.exe
     文件         187  2018-03-26 14:12  ExButton\ExButton\bin\Debug\ExButton.exe.config
     文件       28160  2018-03-27 08:03  ExButton\ExButton\bin\Debug\ExButton.pdb
     文件       22984  2018-03-27 08:04  ExButton\ExButton\bin\Debug\ExButton.vshost.exe
     文件         187  2018-03-26 14:12  ExButton\ExButton\bin\Debug\ExButton.vshost.exe.config
     文件         490  2012-06-06 02:06  ExButton\ExButton\bin\Debug\ExButton.vshost.exe.manifest
     目录           0  2018-03-26 14:12  ExButton\ExButton\obj\
     目录           0  2018-03-27 08:03  ExButton\ExButton\obj\Debug\
............此处省略16个文件信息

评论

共有 条评论