==============================
JF Software VB Modules
By Joshua Foster - JF Software
http://www.jfsoftware.net
jfsoftware@jfsoftware.net
July 7, 2001
==============================
DrawGradient class module
=========================
Description: Draws a gradient on a control.  Example controls are Forms, PictureBoxes, and Printers.


Procedures:
===========
----
Draw
----
Syntax:       Draw(obj As Object, gradtype As GradientType, colorlist() As Long, [x As Long], [y As Long], [height As Long], _
              [width As Long])
Description:  Draws a multi-colored gradient. (default)
Parameters:   obj          - The object to draw the gradient on.
              gradtype     - A number telling what type of gradient to draw. (Type GradientType)
              colorlist()  - An array containing the color value(s).
              x            - The left edge of the gradient (optional; if not specified, 0)
              y            - The top edge of the gradient (optional; if not specified, 0)
              height       - The height of the gradient (optional; if not specified, obj.ScaleHeight for forms, obj.Height for
                             other objects)
              width        - The width of the gradient (optional; if not specified, obj.ScaleWidth for forms, obj.Width for
                             other objects)
Types:        Name:        GradientType
              Description: Tells DrawGradient what type of gradient to draw.
              Members:     GBottomToTop: Draws the gradient from bottom to top.
                           GLeftToRight: Draws the gradient from left to right.
                           GRightToLeft: Draws the gradient from right to left.
                           GTopToBottom: Draws the gradient from top to bottom.

Example:
--------
Private cDrawGradient As DrawGradient  'Define a DrawGradient object

Private Sub Form_Load()
Set cDrawGradient = New DrawGradient  'Load the cDrawGradient object
Dim colorarray(1 To 3) As Long  'Create a 3-item array for the colors
colorarray(1) = RGB(255, 0, 0)  'Color 1 is red
colorarray(2) = RGB(0, 255, 0)  'Color 2 is green
colorarray(3) = RGB(0, 0, 255)  'Color 3 is blue
cDrawGradient.Draw Me, GTopToBottom, colorarray()  'Draw the gradient top-to-bottom on the current form
End Sub
