??

解决方案 »

  1.   

    将Label控件的背景色(BackColor)设置为System.Drawing.Color.Transparent就可以了
      

  2.   

    Label的前景的默认值就是透明的啊
      

  3.   

    没用,System.Drawing.Color.Transparent是系统色,就是灰色.
    我的图片是花花绿绿的,在上面写字有块 文字矩形 背景色,太恶心了.
    有没有办法啊?
      

  4.   

    System.Drawing.Color.Transparent是透明啊
    就是没有颜色啊
    这个我已经试过了啊
    怎么会有问题呢?
      

  5.   

    我也试过了,就是有个灰的背景色
    private void LoginForm_Load(object sender, System.EventArgs e)
    {
    label1.BackColor = System.Drawing.Color.Transparent;

    }代码如下\上!
      

  6.   

    把这个东东发给我看看
    [email protected]
      

  7.   

    this.label1.BackColor = Color.Transparent;this.label1.Parent = this.PictureBox1;//label下面的一个控件,我用的是PictureBox
      

  8.   

    我是直接设置了窗体的前景图案
    然后在form_load中让label的前景色为透明啊
      

  9.   

    你把Label放在其他控件上了吧?譬如Panel?那肯定是灰色的!
      

  10.   

    放在panel里也没问题啊
    我刚刚试过
    难道是人品问题
      

  11.   

    还有一个办法:
    把Label的位置定好后,用Photoshop截图,得到的图片作为Label的背景图
      

  12.   

    那个只是把你的label颜色设置成跟form颜色一致
    如果你背景加图片的话
    应该是不好用的除了System.Drawing.Color.Transparent方法
    好像是不能设置透明
      

  13.   

    好了,有结果了!!!!
    1.一个form,form的背景设为图片,把label放上,backcolor设为Transparent(无需用代码控制,这个是属性).这样是对的2.一个form,form上有个pictureBox,把文字写在pictureBox上,