Whenever I set the RichTextBox.Enabled property to false, its background color is automatically set to gray as it is set to the color in system color which is s
Create a Custom Richtextbox as below This will produce a Richtextbox with a transparent Backcolor. You can then place this control on a suitably colored panel.
Public Class MyRichTextBox
Inherits RichTextBox
_
Shared Function LoadLibrary(ByVal lpFileName As String) As IntPtr
End Function
Protected Overloads Overrides ReadOnly Property CreateParams() As CreateParams
Get
Dim prams As CreateParams = MyBase.CreateParams
If LoadLibrary("msftedit.dll") <> IntPtr.Zero Then
prams.ExStyle = prams.ExStyle Or &H20 'Makes Transparent
prams.ClassName = "RICHEDIT50W"
End If
Return prams
End Get
End Property