J
Jay Pondy
Is the code below the proper way to achieve a LinearGradient
Background on a form?
Private Sub MyForm_Paint(ByVal sender As Object, ByVal e As
PaintEventArgs) Handles Me.Paint
Dim oBrush As New LinearGradientBrush(Me.ClientRectangle,
Color.AliceBlue, Color.CornflowerBlue, LinearGradientMode.Vertical)
e.Graphics.FillRectangle(oBrush, Me.ClientRectangle)
oBrush.Dispose()
end sub
The reason I ask is because it looks like the Paint event is fired one
time for each control on the form.
Background on a form?
Private Sub MyForm_Paint(ByVal sender As Object, ByVal e As
PaintEventArgs) Handles Me.Paint
Dim oBrush As New LinearGradientBrush(Me.ClientRectangle,
Color.AliceBlue, Color.CornflowerBlue, LinearGradientMode.Vertical)
e.Graphics.FillRectangle(oBrush, Me.ClientRectangle)
oBrush.Dispose()
end sub
The reason I ask is because it looks like the Paint event is fired one
time for each control on the form.