|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Transparent Labelit) before, but when I was looking how to set the backstyle of a label control to "Transparent" I found that the VB2005 documentation has reached an all-time low (please note the part about the z-order): MSDN: In Visual Basic 6.0, the BackStyle property of the Label control determines whether the label had a transparent background. Setting the BackStyle property to 0 - Transparent allows any background image to show through the label. If the label is placed over other controls, the controls also show through. In Visual Basic 2005, the BackStyle property no longer exists and the transparency behavior is slightly different (YES, IT DOESN'T EXIST). To emulate the transparent behavior in Visual Basic 2005, set the BackColor property to Transparent. This will allow the background image to show through. If the label is placed over other controls, the controls will show through only if they are higher in the z-order (Z-ORDER YOU SAID? KEEP READING!) Note The ZOrder method no longer exists in Visual Basic 2005. At design time you can use the Bring to Front or Send to Back command on the Format menu; at run time you can use the BringToFront or SendToBack function. No transparency, No z-order.... What will we do now? The Microsoft solution is to move the Picture to the front... How many do you think would still be able to read the label? But ok, we can see the picture... Transparency "Flintstones Style" ;-) Hi,
When you set the backcolor of a control to transparent it will take it parents background. So if your label is over a picturebox and its parent is the form the forms background will show. So add the control to the picturebox's controls collection. Ken ----------------------------- Show quoteHide quote "Martin" wrote: > I've been complaing about the VB2005 Help-Information (or rather the lack of > it) before, but when I was looking how to set the backstyle of a label > control to "Transparent" I found that the VB2005 documentation has reached > an all-time low (please note the part about the z-order): > > MSDN: > In Visual Basic 6.0, the BackStyle property of the Label control determines > whether the label had a transparent background. Setting the BackStyle > property to 0 - Transparent allows any background image to show through the > label. If the label is placed over other controls, the controls also show > through. > > In Visual Basic 2005, the BackStyle property no longer exists and the > transparency behavior is slightly different (YES, IT DOESN'T EXIST). To > emulate the transparent behavior in Visual Basic 2005, set the BackColor > property to Transparent. This will allow the background image to show > through. If the label is placed over other controls, the controls will show > through only if they are higher in the z-order (Z-ORDER YOU SAID? KEEP > READING!) > > Note > The ZOrder method no longer exists in Visual Basic 2005. At design time you > can use the Bring to Front or Send to Back command on the Format menu; at > run time you can use the BringToFront or SendToBack function. > > No transparency, No z-order.... What will we do now? The Microsoft solution > is to move the Picture to the front... How many do you think would still be > able to read the label? But ok, we can see the picture... Transparency > "Flintstones Style" ;-) > > > > Ken,
Thanks a lot! It works like a charm! I achieved this by opening the MyForm.designer.vb file and change the following line: Me.Controls.Add(Me.lblHeader) into: Me.PictureBox1.Controls.Add(Me.lblHeader) But that was in the code marked with: 'It can be modified using the Windows Form Designer. 'Do not modify it using the code editor. How do you modify a controls parentage with the designer? Tia, Martin Show quoteHide quote "Ken Tucker [MVP]" <KenTucker***@discussions.microsoft.com> wrote in message news:12474789-6C61-49D5-9D3F-7468F1B8013A@microsoft.com... > Hi, > > When you set the backcolor of a control to transparent it will > take > it parents background. So if your label is over a picturebox and its > parent > is the form the forms background will show. So add the control to the > picturebox's controls collection. > > Ken > ----------------------------- > > "Martin" wrote: > >> I've been complaing about the VB2005 Help-Information (or rather the lack >> of >> it) before, but when I was looking how to set the backstyle of a label >> control to "Transparent" I found that the VB2005 documentation has >> reached >> an all-time low (please note the part about the z-order): >> >> MSDN: >> In Visual Basic 6.0, the BackStyle property of the Label control >> determines >> whether the label had a transparent background. Setting the BackStyle >> property to 0 - Transparent allows any background image to show through >> the >> label. If the label is placed over other controls, the controls also show >> through. >> >> In Visual Basic 2005, the BackStyle property no longer exists and the >> transparency behavior is slightly different (YES, IT DOESN'T EXIST). To >> emulate the transparent behavior in Visual Basic 2005, set the BackColor >> property to Transparent. This will allow the background image to show >> through. If the label is placed over other controls, the controls will >> show >> through only if they are higher in the z-order (Z-ORDER YOU SAID? KEEP >> READING!) >> >> Note >> The ZOrder method no longer exists in Visual Basic 2005. At design time >> you >> can use the Bring to Front or Send to Back command on the Format menu; at >> run time you can use the BringToFront or SendToBack function. >> >> No transparency, No z-order.... What will we do now? The Microsoft >> solution >> is to move the Picture to the front... How many do you think would still >> be >> able to read the label? But ok, we can see the picture... Transparency >> "Flintstones Style" ;-) >> >> >> >>
How is it possible ...
Edanmo Shell Extension: How to Install it? Unmanaged DLL Callback - Program Unexpectedly Quits Transparent splash screen Carriage Return and Line Feed Syntax need help reading contents of a file into an array...SKYPE ME. tab function in a multiline text box Moving Rectangle within a PictureBox Control Interface creation in VB.Net 2005 Determine disabled status |
|||||||||||||||||||||||