dfg

ggb9901 2009-05-06 11:02:50
dfg
...全文
48 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
ggb9901 2009-05-06
  • 打赏
  • 举报
回复
嘿嘿,刚才网速慢,随便试了下。问题在上面。
ggb9901 2009-05-06
  • 打赏
  • 举报
回复
如何消除自绘控件时的锯齿?

在formload事件中加入以下代码:
System.Windows.Forms.Button myButton = new System.Windows.Forms.Button();
myButton.BackColor = Color.Blue; //Lets change the color
myButton.Size = new Size(100, 100);
System.Drawing.Drawing2D.GraphicsPath myGraphicsPath = new System.Drawing.Drawing2D.GraphicsPath(); //The GraphicsPath class allows us to define custom paths
myGraphicsPath.AddEllipse(5, 5, 90, 90); //A big circle
myButton.Region = new Region(myGraphicsPath); //Associating the path made by us to the button's region
this.Controls.Add(myButton);

效果是画了一个圆形的按钮,但是边缘有锯齿,怎么消除?本来画图用smoothmode是可以的,但加了region就无效了。
Dhoopu 2009-05-06
  • 打赏
  • 举报
回复
散分?

楼主,俺来接分了。

111,126

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 C#
社区管理员
  • C#
  • Creator Browser
  • by_封爱
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

让您成为最强悍的C#开发者

试试用AI创作助手写篇文章吧