Barzimeron Posted March 27, 2006 Posted March 27, 2006 I am using C# 2005 and want to have a transparent label. Can any one help me? Thanks! Quote
Leaders snarfblam Posted March 27, 2006 Leaders Posted March 27, 2006 I recommend you start by looking at MSDN and searching Google with this kind of question. You get a kind of instant gratification. If you look at the Properties window when a label is selected, you will notice that one of the colors that you can set (under the "Web" tab, I think) is Transparent. It is important to understand the behavior of transparent controls in .Net, though. Because of the way that transparent controls are drawn the only thing that will show through a transparent control is that control's parent container (either the gray/tan blank surface, the container's background image, or whatever is normally drawn in the parent container). This may or may not become a problem for you. If the control overlaps another control, the control will appear to "cut a hole" in the other control where they overlap. For instance, if a transparent label overlaps a button, in the area where they overlap, instead of seeing the button under the label, the underlying form will show through the overlapping area. Quote [sIGPIC]e[/sIGPIC]
mskeel Posted March 28, 2006 Posted March 28, 2006 I believe transparency is also only supported in XP, in case you are deploying to other machines (not supported in windows 2000). Just so you are aware... Quote
Leaders snarfblam Posted March 28, 2006 Leaders Posted March 28, 2006 Transparent labels should work. They render themselves via GDI+, which works on all platforms. Things like semi-transparent forms, on the other hand, depend on the Windows 2000/Xp layered windows feature and only work on Xp/2000. Quote [sIGPIC]e[/sIGPIC]
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.