How about an old fashioned fade? The example is vb.net.
Code:Public Class Form4 Private Sub Form4_Load(sender As Object, e As EventArgs) Handles Me.Load Text = "Draw Fade" BackColor = Color.WhiteSmoke End Sub Private Sub Form4_Paint(sender As Object, e As PaintEventArgs) Handles Me.Paint Dim x As Integer = 20 'location Dim y As Integer = 20 Dim w As Integer = 200 'size Dim r As Integer 'fade width For r = 0 To 25 Using p As New Pen(Color.FromArgb(10 * r, Color.Maroon)) e.Graphics.DrawRectangle(p, x + r, y + r, w - (2 * r), w - (2 * r)) End Using Next e.Graphics.FillRectangle(Brushes.Maroon, x + r, y + r, 1 + w - (2 * r), 1 + w - (2 * r)) End Sub End Class




Reply With Quote