要做一个透明Button,由于我的图片有背景的按钮文字很好看的   我就想吧在上面浮动一个Button 的按钮让它透明
可是改完 backcolor 是Transparent 还是不行那?

解决方案 »

  1.   

    自定义控件

    private void Form1_Load(object sender, EventArgs e)
      {
      Rectangle r1 = new Rectangle(0, 0, this.Width, this.Height);
      Rectangle r2 = new Rectangle(100, 100, 200, 200);
      Region r = new Region(r1);
      r.Xor(r2);
      this.Region = r;
      }
    http://www.codeproject.com/KB/buttons/EasyTransparentBut.aspx
      

  2.   

    最简单的方法是用picturebox代替button,
    加一句this.TransparencyKey = System.Drawing.Color.White;
    来设置你想透明的颜色就可以了。当然实现点击picturebox就像点button那样的效果需要图片切换。
      

  3.   

    如果你有图片的话,你可以设置背景图片,如果没有,你就必须用GDI+自己画一个
      

  4.   

    這裡有超級漂亮的按鈕,,,http://www.arcadiahome.com/products/components/activex/powerbutton.htm
    my blog
    http://ufo-crackerx.blog.163.com/