Search Tools Links Login

Gradient Form Background (4 lines of code)


Visual Basic 6, or VB Classic

gradient your forms background

Original Author: Daniel Davies

Assumptions

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

Code

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: 91 times

Categories

Visual Basic 6

Attachments

No attachments for this post


Loading Comments ...

Comments

No comments have been added for this post.

You must be logged in to make a comment.