解决方案 »

  1.   

    用背景图片,或者找一种可以代替Button的控件,例如PictureBox
      

  2.   

    http://msdn.microsoft.com/zh-cn/library/vstudio/system.windows.forms.control.region(v=vs.100).aspx
      

  3.   

    Control.Region 属性详细例子,请看#3
      

  4.   

    重写button类,然后使用Region重绘区域 public partial class ShapeButton : Button
        {
            public ShapeButton()
            {
                InitializeComponent();
            }        protected override void OnPaint(PaintEventArgs pe)
            {
                base.OnPaint(pe);
            }        bool flag;
            [Description(" 获取或设置按钮椭圆效果。"), DefaultValue(false)]
            public bool Circle
            {          
                set
                {
                    flag = value;
                    GraphicsPath gp = new GraphicsPath();
                    gp.AddEllipse(this.ClientRectangle);//圆形
                    this.Region = new Region(gp);
                    FlatAppearance.BorderSize = 0;//去掉边框
                    FlatStyle = System.Windows.Forms.FlatStyle.Flat;
                    BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(128)))), ((int)(((byte)(128)))), ((int)(((byte)(255)))));//背景颜色
                    this.Invalidate();
                }
                get { return flag; }
            }
        }在winform窗体添加了一个shapeButton,然后在属性窗体修改Circle属性为true,就可以改变button的形状
      

  5.   


    这个是自己新建一个类么?添加Button在哪里添加啊?求指导~我是小菜鸟~
      

  6.   

    添加自定义控件,继承button。右键项目,添加,新建项,自定义控件,单击此处切换到代码视图,继承button……这个是自己新建一个类么?添加Button在哪里添加啊?求指导~我是小菜鸟~