重叠控件(透明度) [英] Overlapping controls (Transparency)

查看:81
本文介绍了重叠控件(透明度)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

当我尝试将控件放在一起时,我遇到了有关透明性的问题.

我在用户控件中有一小组按钮,但是如果不将每个按钮的背景都涂在另一个按钮上,就无法将它们布置在正确的位置.

我要求按钮的背景要重叠,而不能将其隐藏.

有谁知道如何做到这一点?

编辑--->

在查看了链接之后,很明显这是用户控件的正确答案,但是在实现此方法时按钮不成功,有人知道为什么没有背景色就无法绘制按钮吗?

再次感谢George

Hi All,

I have encountered a problem regarding transparency when i try to put controls close together.

I have a small cluster of buttons in a user control however i cannot arrange them in the correct place without each buttons background being painted over another.

I require the buttons backgrounds to overlap and not hide the one behind it.

Does anyone have an idea as to how this can be done?

Edit--->

After looking the links it became apparent that this is the correct answer for a user control , however buttons were unsuccessful when implementing this method, does anyone know why a button will not draw without a back color?

Thanks again George

推荐答案

这些链接可能对您有帮助-

使用C#和.NET 3.5制作透明控件 [ http://msdn.microsoft.com/en-us/library/wk5b13s4 (v = vs.71).aspx [ http://www.eggheadcafe.com/forumarchives/NETFrameworkdrawing/Feb2006/post25815823.asp [ ^ ]
These links might help you -

Making Transparent Controls with C# and .NET 3.5[^]
http://msdn.microsoft.com/en-us/library/wk5b13s4(v=vs.71).aspx[^]
http://www.eggheadcafe.com/forumarchives/NETFrameworkdrawing/Feb2006/post25815823.asp[^]


这篇关于重叠控件(透明度)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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