VERSION 5.00
Begin VB.Form Form1 
   Caption         =   "VB6 例10-4 颜色的渐变过程"
   ClientHeight    =   2595
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   4680
   LinkTopic       =   "Form1"
   ScaleHeight     =   2595
   ScaleWidth      =   4680
   StartUpPosition =   3  '窗口缺省
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Form_Click()
    Dim j As Integer, x As Single, y As Single
    x = Form1.ScaleWidth
    y = Form1.ScaleHeight
    sp = 255 / y
    For j = 0 To y
        Line (0, j)-(x, j), RGB(j * sp, j * sp, j * sp)   ' 画线
    Next j
End Sub

