本文介绍了如何在c#.net中添加圆形按钮以进行winform的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我使用以下代码创建圆形按钮,但我没有通过工具箱获得圆形按钮
i was used following code for create round button but i did not get roundbutton in by toolbox
class Round : Button
{
protected override void OnCreateControl()
{
using (var path = new GraphicsPath())
{
path.AddEllipse(new Rectangle(2, 2, this.Width - 5, this.Height - 5));
this.Region = new Region(path);
}
base.OnCreateControl();
}
}
推荐答案
这篇关于如何在c#.net中添加圆形按钮以进行winform的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!