是否存在标签和其他控件缺乏真正透明性的解决方法 [英] Is there a workaround for the lack of true transparency in labels and other controls

查看:68
本文介绍了是否存在标签和其他控件缺乏真正透明性的解决方法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试制作一个标签透明.当我将BackColor设置为透明时,它所做的全部就是它所坐的形式的颜色,即 这不是真正的透明.我在Google上进行了搜索,并在另一个线程(来自MSFT MVP)中找到了它

I'm trying to make a label transparent. When I set the BackColor to transparent, all it does it take the color of the form it's sitting on, i.e. It's not truly transparent. I've googled it and found this in another thread (from a MSFT MVP)

" .NET控件不支持 真正的透明度.您可以将其BackColor设置为Transparent(在某些情况下(但不是全部)),并且父控件将显示出来,但仅父控件显示.如果后面还有其他控件,则该控件不是父控件,它将不会显示出来.那是因为 该控件不是真正透明的.它基本上是在其后面的区域中复制其父级并将其用作背景,但这并不包括可能在其后方的同级控件.

".NET controls do not support true transparency. You can set their BackColor to Transparent (in some but not all cases) and the parent control will show through, but only the parent control. If there is some other control behind that is not the parent it will not show through. That's because the control is not truly transparent. It basically copies its parent in the area behind it and uses that as its background, but that doesn't include sibling controls that may be behind it as well."

对我来说,这是完全不可接受的. as 有人成功进行了真正透明的控制吗?

To me, this is completely unacceptable. Why even include the transparency option when all it does is set the control's backcolor to the form color? I'm trying to add a label over a progress bar to give my user some feedback (because the Visual Studio progress bar doesn't support text, which is also a horrible design shortfall by the way), and have yet to find a way around this. Has anyone successfully made a truly transparent control?

推荐答案

已删除


这篇关于是否存在标签和其他控件缺乏真正透明性的解决方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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