你的问题关于GDI+的贴子:
http://expert.csdn.net/Message_Board/Send.asp?sendto=shuen我以前也遇到过,你是不是想做不规则窗体?如果是的话,建议不要使用透明色,那样处理起来,做程序时很容易 ,但运行时,很不正常.
通常不规则窗体都是使窗体的方法是这样的http://tech.ccidnet.com/pub/disp/Article?columnID=294&articleID=25457&pageNO=1关键是这几句话:
System.Drawing.Drawing2D.GraphicsPath myGraphicsPath = new
System.Drawing.Drawing2D.GraphicsPath();
myGraphicsPath.AddEllipse(new Rectangle(0, 0, 125, 125));
myGraphicsPath.AddEllipse(new Rectangle(75, 75, 20, 20));
myGraphicsPath.AddEllipse(new Rectangle(120, 0, 125, 125));
myGraphicsPath.AddEllipse(new Rectangle(145, 75, 20, 20));
//改变按钮的背景颜色使之能被容易辨认
button1.BackColor = Color.Chartreuse;
button1.Size = new System.Drawing.Size(256, 256);
button1.Region = new Region(myGraphicsPath);
而不是这样的:
http://www.6to23.com/s11/s11d8/s11d8d2/200416113027.htm
http://expert.csdn.net/Message_Board/Send.asp?sendto=shuen我以前也遇到过,你是不是想做不规则窗体?如果是的话,建议不要使用透明色,那样处理起来,做程序时很容易 ,但运行时,很不正常.
通常不规则窗体都是使窗体的方法是这样的http://tech.ccidnet.com/pub/disp/Article?columnID=294&articleID=25457&pageNO=1关键是这几句话:
System.Drawing.Drawing2D.GraphicsPath myGraphicsPath = new
System.Drawing.Drawing2D.GraphicsPath();
myGraphicsPath.AddEllipse(new Rectangle(0, 0, 125, 125));
myGraphicsPath.AddEllipse(new Rectangle(75, 75, 20, 20));
myGraphicsPath.AddEllipse(new Rectangle(120, 0, 125, 125));
myGraphicsPath.AddEllipse(new Rectangle(145, 75, 20, 20));
//改变按钮的背景颜色使之能被容易辨认
button1.BackColor = Color.Chartreuse;
button1.Size = new System.Drawing.Size(256, 256);
button1.Region = new Region(myGraphicsPath);
而不是这样的:
http://www.6to23.com/s11/s11d8/s11d8d2/200416113027.htm
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货