If you want to draw a nice looking gradient on the form, you can use this...
GeSHi (vbnet):
Private Sub Form1_Paint(ByVal sender As Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles Me.Paint
'Leave a small border of 5px around the gradient
'Dim rect As New Rectangle(5, 5, Me.ClientRectangle.Width - 10, Me.ClientRectangle.Height - 10)
'If you want to fill the whole window use this line instead
Dim rect As New Rectangle(0, 0, Me.ClientRectangle.Width, Me.ClientRectangle.Height)
' If you want a single line border uncomment this
'Dim DrawingPen As New Pen(Color.Blue, 2)
'e.Graphics.DrawRectangle(DrawingPen, Rectangle)
' Do the gradient
Dim DrawingBrush As New System.Drawing.Drawing2D.LinearGradientBrush( _
rect, Color.LightGray, Color.Gray, Drawing2D.LinearGradientMode.ForwardDiagonal)
e.Graphics.FillRectangle(DrawingBrush, rect)
End Sub
Private Sub Form1_Resize(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Resize
'Telling windows to repaint the window
Me.Invalidate()
End Sub
Created by GeSHI 1.0.7.20
Copy & Paste this code into your form and hit F5
