Dim cor1 As Color = Color.SkyBlue Dim cor2 As Color = Color.Lime Private Sub TabPageExecutarPrograma_Paint(ByVal sender As Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles TabPageExecutarPrograma.Paint Dim FormGraphics As Graphics = e.Graphics Dim GradientBrush As Brush GradientBrush = New LinearGradientBrush(New Point(0, 0), New Point(0, Me.Height), cor1, cor2) FormGraphics.FillRectangle(GradientBrush, ClientRectangle) End Sub Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click cor1 = Color.Blue cor2 = Color.Green End Sub
cor1
cor2
Paint
TabPageExecutarPrograma.Invalidate
WM_PAINT
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)