well i'm trying to create a control that inherits from textbox or richtextbox to make the background gradient
i use the following code :
Protected Overrides Sub OnPaint(ByVal e As PaintEventArgs)
MyBase.OnPaint(e)
Dim gbr As LinearGradientBrush = New LinearGradientBrush(New Rectangle(0, 0, Me.Width, Me.Height), Color.White, Color.Blue, LinearGradientMode.Horizontal)
e.Graphics.FillRectangle(gbr, New Rectangle(0, 0, Me.Width, Me.Height))
End Sub
but this isn't working... the backcolor in both is always white.
Question
Cool4
well i'm trying to create a control that inherits from textbox or richtextbox to make the background gradient
i use the following code :
but this isn't working... the backcolor in both is always white.
can someone help? thanks in advance ;)
Link to comment
Share on other sites
0 answers to this question
Recommended Posts