I have the following code placed inside an MDI Parent Form's Paint method:
Private Sub frmMain_Paint(ByVal sender As Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles Me.Paint
Dim brushBlueGradient As LinearGradientBrush
brushBlueGradient = New LinearGradientBrush(Me.ClientRectangle, _
Color.FromArgb(115, 160, 196), _
Color.FromArgb(194, 213, 224), _
LinearGradientMode.Vertical)
e.Graphics.FillRectangle(brushBlueGradient, New Rectangle(0, 0, Me.ClientSize.Width, Me.ClientSize.Height))
End Sub
Yet when it runs, the MDI Parent's background is not changed. What am I missing?
Thanks for any help that can be offered.
________________________
Ben Santiago, MCP & A+
Programmer Analyst (SQL, FoxPro, VB, VB.Net, Java, HTML, ASP, JSP, VBS)
Eastern Suffolk BOCES - Student Data Services
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
-Rich Cook