Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Background color fade

Status
Not open for further replies.

biggvito

Technical User
Joined
Oct 22, 2001
Messages
14
Location
GB
I've seen programs running with the background color fading into another color(blue on left then fading to purple towards right). Has anyone got an idea on how to do this?
 
This will give you the idea, although it paints from top to bottom it shouldn't be difficult to modify it...put it in the form's paint event.

Dim i As Integer
Dim c As Integer
Dim W As Integer

On Error GoTo FPErr

DrawStyle = 6
DrawMode = 13
DrawWidth = 2
ScaleMode = 3
ScaleHeight = 512

c = 0
W = Me.Width

For i = 0 To 255
Line (0, i)-(W, i + 1), RGB(c, c, c), B
c = c + 1
Next i
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top