' This statement assumes that you have imported the System.Drawing namespace
' This code should run inside a Windows Form class
Dim gr As Graphics = Me.CreateGraphics
Dim br As New LinearGradientBrush(New Rectangle(0, 0, 200, 100), Color.Blue, _
Color.Black, LinearGradientMode.ForwardDiagonal)
gr.FillRectangle(br, 0, 0, 200, 100)
gr.FillRectangle(br, 220, 0, 200, 100)
br.Dispose()
gr.Dispose()