本人用VS2005做应用系统开发,在一个Form中用picturebox设置了一张图片,现在我在图片上放置了一个label控件,输入文本发现文本有灰色的背景色,我想请教我该如何才能去掉背景色,也就是不要背景色,让后面的图片作为背景,请问label中有没有这样的属性?谢谢!

解决方案 »

  1.   

    Transparent 属性直接透明到了Form面板,而不是pictureBox上的图片背景啊
      

  2.   

    可以考虑不用label控件吗?
    直接在图片上用graphics类画字符串上去Graphics g = Graphics.FromImage(PictureBox1.Image);
    g.DrawString(content, new Font("Arial", 10, FontStyle.Regular), new SolidBrush(Color.Blue), pointX, pointY);
    g.Dispose();
      

  3.   

    重写picture控件,在控件上画你需要的字。
    label是没有这样的属性的。
    这个只有你自己写。