C#里面可不可以改变button的外形   就是把按钮搞的个性点的如果有的话请说下  谢谢了

解决方案 »

  1.   

    this.Region = new Region(path);path是一个GraphicPath类型的对象,这个对象里面楼主可以添加封闭曲线组成控件的边界
    path.Add...(...);
      

  2.   

    如果要改变形状的话。private void Form1_Paint(object sender, PaintEventArgs e)
            {
                System.Drawing.Drawing2D.GraphicsPath buttonPath =
                             new System.Drawing.Drawing2D.GraphicsPath();            // Set a new rectangle to the same size as the button's 
                // ClientRectangle property.
                System.Drawing.Rectangle newRectangle = this.button1.ClientRectangle;            // Decrease the size of the rectangle.
                newRectangle.Inflate(-10, -10);            // Draw the button's border.
                e.Graphics.DrawEllipse(System.Drawing.Pens.Black, newRectangle);            // Increase the size of the rectangle to include the border.
                newRectangle.Inflate(1, 1);            // Create a circle within the new rectangle.
                buttonPath.AddEllipse(newRectangle);            // Set the button's Region property to the newly created 
                // circle region.
                this.button1.Region = new System.Drawing.Region(buttonPath);        }
      

  3.   

    我说的就是3楼的那个意思,3楼说的下面两句:buttonPath.AddEllipse(newRectangle);    // Set the button's Region property to the newly created 
    // circle region.
    this.button1.Region = new System.Drawing.Region(buttonPath);就是让按钮变成椭圆形的,楼主没明白?
      

  4.   

    你自己先做个小程序看一下啊,一个button,然后在Form1的Paint消息处理函数里面添加这部分代码,就可以直接实现效果了。
    再看看每一句的注释就应该差不多了吧。
      

  5.   

    大哥啊   我是初学者  不懂   好像没有paint 函数
      

  6.   

    imagebutton。弄个按钮的图片连接上就可以了。
      

  7.   

    可以用图片啊。mousedown事件中加个图片。mouseup事件中放另一个图片。这样点击时就出效果了。
      

  8.   

    picturebox  这个也很好用  也可以用第三方控件皮肤
      

  9.   

    用imagebutton最直接 否则就要GDI+自己画了 
      

  10.   

    还可以自己继承BUTTON类去写个新的,不过稍微复杂了点
      

  11.   

    imagebutton是不是2008里面的  我用的 那个里面没有
      

  12.   

    skinEngine1控件,可以达到你想要的目的,而且甚至可以做得更好.
    该控件自带多种界面.用法也很简单
    把设置一下this.skinEngine1.SkinFile=你的ssk文件即可.
    如果需要,留下Email
    发给你
      

  13.   

    支持imagebutton。自己做个个性图片放上去就OK了,只要在相应的事件写点击代码就OK了.
      

  14.   

    支持imagebutton。自己做个个性图片放上去就OK了,只要在相应的事件写点击代码就OK了.
      

  15.   

    Form1右键-》属性,属性框中点击事件按钮,就是那个闪电形的标志,然后找到Paint,在右边的框中双击。
      

  16.   

    有好几种办法实现
    Regionimagebutton皮肤控件还有用背景图片
    把button的一个属性改为transparent
      

  17.   

    大哥,把第三方控件发给我吧![email protected] 谢谢了