Hi,
i read a lot of post in this forum, about the true transparent BG in a label, but i dont resolve the problem.
with a "normal" label
Inherits System.Windows.Forms.Label Protected Overrides ReadOnly Property CreateParams() As System.Windows.Forms.CreateParams Get Dim cp As CreateParams = MyBase.CreateParams cp.ExStyle = cp.ExStyle Or &H20 ' color Transparent Return cp End Get End Property Public Sub New() Me.SetStyle(ControlStyles.SupportsTransparentBackColor, True)
end sub
its work, but i want use ultralabel, cause i need alpha too and other properties that the ultralabel have.
i try to replace Inherits System.Windows.Forms.Label with Inherits Infragistics.Win.Misc.UltraLabel but dont work
the background is black and i dont understand why.
can u help me? tks a lot
Thank you for the update.
The behavior you are encountering in the image you've demonstrated is the correct behavior for all Windows Forms controls because Windows Forms doesn't support "true" transparency. According to the note found in the note given by MSDN (Click Here), "Windows Forms controls do not support true transparency. The background of a transparent Windows Forms control is painted by its parent." This would indicate that the UltraLabels parent is the Form itself and not the UltraPictureBox, therefore providing you with the behavior you are encountering.
I recommend following the steps provided in the following webpage to help provide you with the behavior you are looking to achieve with Windows Forms controlshttp://www.codeproject.com/Articles/25048/How-to-Use-Transparent-Images-and-Labels-in-Window
Please let me know if you have any questions regarding this matter.
hi, tks for answer, i put my code cause, this solution (ultralabel.appearance.backcolor dont work).
if i put my ultralabel, over a pic or over another control, my label is not transparent. i dont stay on my work now, but if u need i put a pic about it.
www.northia.it/images/text on pic.jpg
Please let me know if you require further assistance regarding the enabling of an UltraLabel with a transparent background. I will be happy to assist you further with any additional questions you may have regarding Mike's solution.
If you want UltraLabel to be transparent, you don't have to derive a control. Just set the BackColor to Transparent.
this.ultraLabel1.Appearance.BackColor = Color.Transparent;
By the way... the same thing works for the inbox Label:
this.label1.BackColor = Color.Transparent;