Stick this behind the form
Protected Overrides Sub OnPaint(ByVal e As PaintEventArgs)
MyBase.OnPaint(e)
Dim baseBackground As System.Drawing.Drawing2D.LinearGradientBrush
baseBackground = New LinearGradientBrush(New Point(0, 0), _
New Point(ClientSize.Width, 0), _
Color.Blue, _
Color.Red)
e.Graphics.FillRectangle(baseBackground, ClientRectangle)
End Sub
"HenryC" <he***@tste.com> wrote in message
news:uW**************@TK2MSFTNGP14.phx.gbl...
Thanks,
I am new to VB and have already read quite a bit without getting it right.
Some code snippet would be nice.
"Bob Powell [MVP]" <bob@_spamkiller_bobpowell.net> wrote in message
news:eE**************@TK2MSFTNGP15.phx.gbl... Override OnPaintBackground and see the LinearGradientBrush help details.
--
Bob Powell [MVP]
Visual C#, System.Drawing
Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tipstricks.htm
Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/faqmain.htm
All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.
"HenryC" <he***@tste.com> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl... > How does one create a gradient background for a form?
>
>