Option Strict On Imports System.Drawing Imports System.Windows.Forms Imports System.ComponentModel Public Class cTextboxEx Inherits System.Windows.Forms.TextBox 'Tous les événements interceptés doivent être relancés Public Shadows Event GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Private _DisabledColor As Color = Color.Gainsboro <Category("Plus"), Description("Sets the BackColor when Disabled")> _ Public Property DisabledColor() As Color Get Return _DisabledColor End Get Set(ByVal Value As Color) _DisabledColor = Value End Set End Property Protected Overrides Sub OnPaint(ByVal e As System.Windows.Forms.PaintEventArgs) Dim TextBrush As SolidBrush = New SolidBrush(Me.ForeColor) 'Set user selected backcolor when disabled If Me.Enabled Then Else Dim BackBrush As New SolidBrush(_DisabledColor) e.Graphics.FillRectangle(BackBrush, 0.0F, 0.0F, Me.Width, Me.Height) End If 'Paint text e.Graphics.DrawString(Me.Text, Me.Font, TextBrush, 0.0F, 0.0F) End Sub Protected Overrides Sub OnEnabledChanged(ByVal e As System.EventArgs) MyBase.OnEnabledChanged(e) If Not Me.Enabled Then Me.SetStyle(ControlStyles.UserPaint, True) Else Me.SetStyle(ControlStyles.UserPaint, False) End If End Sub Protected Overrides Sub OnGotFocus(ByVal e As System.EventArgs) Me.SelectAll() Me.Invalidate() RaiseEvent GotFocus(Me, e) End Sub End Class>The other problem is that many other controls (like combobox, checkbox, radiobutton, ...) don't have the ReadOnly property.