Search Tools Links Login

Gradient Form Background (4 lines of code)

gradient your forms background

Original Author: Daniel Davies


Create a new project and place a command button on it...copy and paste the code, and hit F5


Private Sub Command1_Click()
Dim Amount
Form1.AutoRedraw = True
Amount = (255 / ScaleHeight)
For i = 0 To Form1.ScaleHeight
  Form1.Line (0, i)-(ScaleWidth, i), _
  RGB(0, 0, Amount * i)
Next i
End Sub

About this post

Posted: 2002-06-01
By: ArchiveBot
Viewed: 73 times


Visual Basic 6


No attachments for this post

Loading Comments ...


No comments have been added for this post.

You must be logged in to make a comment.