如何做一个标签将是没有颜色的背景? [英] How to do a background for a label will be without color?

查看:172
本文介绍了如何做一个标签将是没有颜色的背景?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要一个标签添加到我的形式,我想它没有任何color-我只想它的文字是可见的,我不觉得在标签的属性此选项,任何人都可以帮我吗?

I want to add a label to my form , and I want it without any color- I want just it's text to be visible, I don't find this option in the label's properties, can anyone help me please?

推荐答案

你想使标签(除了文本)透明? Windows窗体(我假设的WinForms - 这是真的),并没有真正支持透明度。最简单的方法,有时是标签的背景色为透明。

Do you want to make the label (except for the text) transparent? Windows Forms (I assume WinForms - is this true) doesn't really support transparency. The easiest way, sometimes, is Label's Backcolor to Transparent.

label1.BackColor = System.Drawing.Color.Transparent;

您会碰到的问题虽然,因为真正的WinForms不能正常支持透明度。否则,在这里看到:

You will run into problems though, as WinForms really doesn't properly support transparency. Otherwise, see here:

HTTP://www.doogal。 co.uk/transparent.php

http://www.codeproject.com/KB/dotnet/transparent_controls_net.aspx

http://www.daniweb.com/code/snippet216425.html

Setting UserControl的父防止它被透明

祝你好运!

这篇关于如何做一个标签将是没有颜色的背景?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆