没有合适的资源?快使用搜索试试~ 我知道了~
XP风格的按钮源代码,简单易用,只是一个抛砖引玉的作用,希望各位好友不吝赐教
资源推荐
资源详情
资源评论
using System.Collections;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Windows.Forms;
using System.Diagnostics;
namespace EastSpider
{
/// <summary>
/// Summary description for VSNetButton.
/// </summary>
public class XPButton : System.Windows.Forms.Button
{
bool gotFocus = false;
bool mouseDown = false;
bool mouseEnter = false;
bool useDisableImage = true;
public XPButton()
{
SetStyle(ControlStyles.AllPaintingInWmPaint|ControlStyles.UserPaint|ControlStyles.Opaque,
true);
}
public bool UseDisableImage
{
get
{
return useDisableImage;
}
set
{
useDisableImage = value;
}
}
protected override void OnPaint(PaintEventArgs
pe)
{
base.OnPaint(pe);
Graphics g = pe.Graphics;
if ( mouseDown )
{
DrawSelectedState(g,
ColorUtil.VSNetPressedColor);
return;
}
if (mouseEnter)
{
DrawSelectedState(g,
ColorUtil.VSNetSelectionColor);
return;
剩余8页未读,继续阅读
资源评论
bplyplyp
- 粉丝: 0
- 资源: 6
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功