资源简介
c# winform 超漂亮按钮 控件,一个自定义控件,一个重写button类
代码片段和文件信息
using System;
using System.Data;
using System.Drawing;
using System.Collections;
using System.Windows.Forms;
using System.ComponentModel;
using System.Drawing.Drawing2D;
namespace CRB.Platform.WinUI.Core.WorkflowOp.Ctrl
{
///
/// A replacement for the Windows Button Control.
///
[DefaultEvent(“Click“)]
public class BeautyButton : System.Windows.Forms.UserControl
{
#region - Designer -
private System.ComponentModel.Container components = null;
///
/// Initialize the component with it‘s
/// default settings.
///
public BeautyButton()
{
InitializeComponent();
this.Setstyle(Controlstyles.AllPaintingInWmPaint true);
this.Setstyle(Controlstyles.DoubleBuffer true);
this.Setstyle(Controlstyles.ResizeRedraw true);
this.Setstyle(Controlstyles.Selectable true);
this.Setstyle(Controlstyles.SupportsTransparentBackColor true);
this.Setstyle(Controlstyles.UserPaint true);
this.BackColor = Color.Transparent;
mFadeIn.Interval = 30;
mFadeOut.Interval = 30;
}
///
/// Release resources used by the control.
///
protected override void Dispose( bool disposing )
{
if( disposing )
{
if(components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}
#region - Component Designer generated code -
private void InitializeComponent()
{
//
// VistaButton
//
this.Name = “VistaButton“;
this.Size = new System.Drawing.Size(100 32);
this.Paint += new System.Windows.Forms.PaintEventHandler(this.VistaButton_Paint);
this.KeyUp += new System.Windows.Forms.KeyEventHandler(this.VistaButton_KeyUp);
this.KeyDown += new System.Windows.Forms.KeyEventHandler(this.VistaButton_KeyDown);
this.MouseEnter += new System.EventHandler(this.VistaButton_MouseEnter);
this.MouseLeave += new System.EventHandler(this.VistaButton_MouseLeave);
this.MouseUp +=new MouseEventHandler(VistaButton_MouseUp);
this.MouseDown += new System.Windows.Forms.MouseEventHandler(this.VistaButton_MouseDown);
this.GotFocus +=new EventHandler(VistaButton_MouseEnter);
this.LostFocus +=new EventHandler(VistaButton_MouseLeave);
this.mFadeIn.Tick += new EventHandler(mFadeIn_Tick);
this.mFadeOut.Tick += new EventHandler(mFadeOut_Tick);
this.Resize +=new EventHandler(VistaButton_Resize);
}
#endregion
#endregion
#region - Enums -
///
/// A private enumeration that determines
/// the mouse state in relation to the
/// current instance of the control.
///
enum State {None Hover Pressed};
///
/// A public enumeration that determines whether
/// the button background is painted when the
/// mouse is not inside the ClientArea.
///
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 4791 2016-11-29 14:58 CrystalButton.cs
文件 21950 2016-11-29 14:29 BeautyButton.cs
文件 6440 2016-11-29 14:24 BeautyButton.resx
----------- --------- ---------- ----- ----
33181 3
- 上一篇:传智播客wpf基础视频教程(第三季).txt
- 下一篇:C#写的 模拟 cmd界面
相关资源
- 智慧城市 智能家居 C# 源代码
- c#获取mobile手机的IMEI和IMSI
- C#实现简单QQ聊天程序
- 操作系统 模拟的 欢迎下载 C#版
- C#写的计算机性能监控程序
- 用C#实现邮件发送,有点类似于outlo
- MVC model层代码生成器 C#
- c#小型图书销售系统
- C# Socket Server Client 通讯应用 完整的服
- c# winform 自动登录 百度账户 源代码
- C#编写的16进制计算器
- C#TCP通信协议
- C# 数据表(Dataset)操作 合并 查询一
- C#语音识别系统speechsdk51,SpeechSDK51L
- 数据库备份还原工具1.0 C# 源码
-
[免费]xm
lDocument 节点遍历C# - EQ2008LEDc#开发实例
- DirectX.Capturec# winform 操作摄像头录像附
- c# 实现的最大最小距离方法对鸢尾花
- C#版保龄球记分代码
- C#自定义控件
- 基于c#的实验室设备管理系统621530
- C# 使用ListView控件实现图片浏览器(源
- C#简单窗体聊天程序
- C#指纹识别系统程序 报告
- c# 高校档案信息管理系统
- c#向word文件插入图片
- C#左侧导航菜单(动态生成)
- C#TCP 通信(TCP发送16进制)
- C# sql实现批量导入数据到数据库
评论
共有 条评论