The WinForms label isn't very good when it comes to transparency, this one is better. Saying that, in some scenarios it may not repaint itself. It also doesn't support all the properties provided by the Label control, so your mileage may vary. If there's anything missing that you need, let me know and I'll try to add it in.
using System; using System.Drawing; using System.Windows.Forms; namespace WinFormsControls { /// <summary> /// A label that can be transparent. /// </summary> public class TransparentLabel : Control { /// <summary> /// Creates a new <see cref="TransparentLabel"/> instance. /// </summary> public TransparentLabel() { TabStop = false; } /// <summary> /// Gets the creation parameters. /// </summary> protected override CreateParams CreateParams { get { CreateParams cp = base.CreateParams; cp.ExStyle |= 0x20; return cp; } } /// <summary> /// Paints the background. /// </summary> /// <param name="e">E.</param> protected override void OnPaintBackground(PaintEventArgs e) { // do nothing } /// <summary> /// Paints the control. /// </summary> /// <param name="e">E.</param> protected override void OnPaint(PaintEventArgs e) { using (SolidBrush brush = new SolidBrush(ForeColor)) { if (RightToLeft == RightToLeft.Yes) { SizeF size = e.Graphics.MeasureString(Text, Font); e.Graphics.DrawString(Text, Font, brush, Width-size.Width, 0); } else e.Graphics.DrawString(Text, Font, brush, -1, 0); } } /// <summary> /// Gets or sets the text associated with this control. /// </summary> /// <returns> /// The text associated with this control. /// </returns> public override string Text { get { return base.Text; } set { base.Text = value; RecreateHandle(); } } /// <summary> /// Gets or sets a value indicating whether control's elements are aligned to support locales using right-to-left fonts. /// </summary> /// <value></value> /// <returns> /// One of the <see cref="T:System.Windows.Forms.RightToLeft"/> values. The default is <see cref="F:System.Windows.Forms.RightToLeft.Inherit"/>. /// </returns> /// <exception cref="T:System.ComponentModel.InvalidEnumArgumentException"> /// The assigned value is not one of the <see cref="T:System.Windows.Forms.RightToLeft"/> values. /// </exception> /// <PermissionSet> /// <IPermission class="System.Security.Permissions.EnvironmentPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true"/> /// <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true"/> /// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="UnmanagedCode, ControlEvidence"/> /// <IPermission class="System.Diagnostics.PerformanceCounterPermission, System, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true"/> /// </PermissionSet> public override RightToLeft RightToLeft { get { return base.RightToLeft; } set { base.RightToLeft = value; RecreateHandle(); } } /// <summary> /// Gets or sets the font of the text displayed by the control. /// </summary> /// <value></value> /// <returns> /// The <see cref="T:System.Drawing.Font"/> to apply to the text displayed by the control. The default is the value of the <see cref="P:System.Windows.Forms.Control.DefaultFont"/> property. /// </returns> /// <PermissionSet> /// <IPermission class="System.Security.Permissions.EnvironmentPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true"/> /// <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true"/> /// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="UnmanagedCode, ControlEvidence"/> /// <IPermission class="System.Diagnostics.PerformanceCounterPermission, System, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true"/> /// </PermissionSet> public override Font Font { get { return base.Font; } set { base.Font = value; RecreateHandle(); } } } }