All articles| All Pictures| All Softwares| All Video| Go home page| Write articles| Upload pictures

Reading number is top 10 articles
限定GridView宽度并加上滚动条_[Asp.Net教程]
PHP中 ADODB 类库介绍(二)_[PHP教程]
6种常用ASP.NET验证控件_[Asp.Net教程]
c#判断数据NULL值的方法_[Asp.Net教程]
Transact_SQL小手册(各种sql语句大集合)_[SQL,Server教程]
DELPHI构件的概念以及制作方法
动态网页技术PHP关于cookie和session的分析_php资料_编程技术
经典php实现大文件上传源代码_[PHP教程]
ASP.NET从零起步设计网站全过程(1)_[Asp.Net教程]
用PHP程序实现从数组里筛选出重复的数据_[PHP教程]
Reading number is top 10 pictures
Sell the barbecue as says father du breul4
Fan bingbing black wings for platform and DanLuoWang believes beauty1
2012 national geographic daily picture1
Fury xp desktop theme
Chinese paper-cut grilles art appreciation6
你是左脑型还是右脑型
Original author said, this is the Hengyang people
Wild animals melee moment of life and death2
传销的好处
Beautiful vacuum girl3
Download software ranking
传奇私服架设教程
SP3 for SQL2000
美女写真1
VC++6.0培训教程
Call Of Duty5
Photoshop 8.0图象编辑软件
Tram sex maniac 2 (H) rar bag10
打鸟视频
jBuilder2006
传奇私服架设教程-chm
aaa published in(发表于) 2013/12/6 10:25:43 Edit(编辑)
C#,制作出任意不规则按钮_.net资料_编程技术

C#,制作出任意不规则按钮_.net资料_编程技术

C# 制作出任意不规则按钮_.net资料_编程技术-数科优化网

  C# 制作出任意不规则按钮! (原理根据背景图绘制button)


using System.Drawing.Drawing2D;
private void button3_Paint(object sender, System.Windows.Forms.PaintEventArgs e)
{ this.button3.Cursor = Cursors.Hand;
Bitmap bmpBob =(Bitmap)this.button3.Image;
GraphicsPath graphicsPath = CalculateControlGraphicsPath(bmpBob);
this.button3.Region = new Region(graphicsPath);
}
private static GraphicsPath CalculateControlGraphicsPath(Bitmap bitmap)
{

GraphicsPath graphicsPath = new GraphicsPath();

Color colorTransparent = bitmap.GetPixel(0, 0);

int colOpaquePixel = 0;

for(int row = 0; row < bitmap.Height; row ++)
{
colOpaquePixel = 0;

for(int col = 0; col < bitmap.Width; col ++)
{

if(bitmap.GetPixel(col, row) != colorTransparent)
{

colOpaquePixel = col;

int colNext = col;

for(colNext=colOpaquePixel; colNext if(bitmap.GetPixel(colNext, row) == colorTransparent)
break;

graphicsPath.AddRectangle(new Rectangle(colOpaquePixel,
row, colNext - colOpaquePixel, 1));

col = colNext;
}
}
}
return graphicsPath;
}






添加到del.icio.us 添加到新浪ViVi 添加到百度搜藏 添加到POCO网摘 添加到天天网摘365Key 添加到和讯网摘 添加到天极网摘 添加到黑米书签 添加到QQ书签 添加到雅虎收藏 添加到奇客发现 diigo it 添加到饭否 添加到飞豆订阅 添加到抓虾收藏 添加到鲜果订阅 digg it 貼到funP 添加到有道阅读 Live Favorites 添加到Newsvine 打印本页 用Email发送本页 在Facebook上分享


Disclaimer Privacy Policy About us Site Map

If you have any requirements, please contact webmaster。(如果有什么要求,请联系站长)
Copyright ©2011-
uuhomepage.com, Inc. All rights reserved.