VERSION 5.00
Object = "{ECEDB943-AC41-11D2-AB20-000000000000}#2.0#0"; "CMAX20.OCX"
Object = "{2441902D-C602-47ED-9E8A-67296B314028}#8.0#0"; "ColorPicker.ocx"
Object = "{BB31661F-0587-11D6-9DD0-00C04F0BD97C}#1.0#0"; "prjChameleon.ocx"
Begin VB.Form frmTool_Rainbow 
   BackColor       =   &H8000000A&
   BorderStyle     =   1  'uTw
   Caption         =   "Rainbow-Fade Text Wizard..."
   ClientHeight    =   5610
   ClientLeft      =   45
   ClientTop       =   330
   ClientWidth     =   5400
   Icon            =   "frmTool_Rainbow.frx":0000
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   5610
   ScaleWidth      =   5400
   StartUpPosition =   1  'ݵ
   Begin CodeMaxCtl.CodeMax rtc 
      Height          =   2055
      Left            =   120
      OleObjectBlob   =   "frmTool_Rainbow.frx":014A
      TabIndex        =   9
      Top             =   3000
      Width           =   5055
   End
   Begin prjChameleon.chameleonButton Command3 
      Cancel          =   -1  'True
      Height          =   375
      Left            =   4080
      TabIndex        =   8
      Top             =   5160
      Width           =   1095
      _ExtentX        =   1931
      _ExtentY        =   661
      BTYPE           =   3
      TX              =   "&Close"
      ENAB            =   -1  'True
      BeginProperty FONT {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      COLTYPE         =   1
      FOCUSR          =   -1  'True
      BCOL            =   13160660
      FCOL            =   0
      FCOLO           =   0
      MPTR            =   0
      MICON           =   "frmTool_Rainbow.frx":02B4
   End
   Begin prjChameleon.chameleonButton Command2 
      Height          =   375
      Left            =   2760
      TabIndex        =   7
      Top             =   5160
      Width           =   1215
      _ExtentX        =   2143
      _ExtentY        =   661
      BTYPE           =   3
      TX              =   "&Insert Code"
      ENAB            =   -1  'True
      BeginProperty FONT {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      COLTYPE         =   1
      FOCUSR          =   -1  'True
      BCOL            =   13160660
      FCOL            =   0
      FCOLO           =   0
      MPTR            =   0
      MICON           =   "frmTool_Rainbow.frx":02D0
   End
   Begin prjChameleon.chameleonButton Command1 
      Default         =   -1  'True
      Height          =   375
      Left            =   1680
      TabIndex        =   6
      Top             =   2520
      Width           =   1695
      _ExtentX        =   2990
      _ExtentY        =   661
      BTYPE           =   3
      TX              =   "&Generate Code"
      ENAB            =   -1  'True
      BeginProperty FONT {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      COLTYPE         =   1
      FOCUSR          =   -1  'True
      BCOL            =   13160660
      FCOL            =   0
      FCOLO           =   0
      MPTR            =   0
      MICON           =   "frmTool_Rainbow.frx":02EC
   End
   Begin VB.Frame Frame1 
      Caption         =   "Options"
      BeginProperty Font 
         Name            =   "Tahoma"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   2175
      Left            =   120
      TabIndex        =   0
      Top             =   120
      Width           =   5055
      Begin VB.TextBox rt1 
         BeginProperty Font 
            Name            =   "Tahoma"
            Size            =   9
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   1335
         Left            =   120
         MultiLine       =   -1  'True
         ScrollBars      =   3  '̬Ҧ
         TabIndex        =   10
         Top             =   240
         Width           =   4815
      End
      Begin ColorPicker.ColorPick pic2 
         Height          =   315
         Left            =   2400
         TabIndex        =   5
         Top             =   1680
         Width           =   855
         _ExtentX        =   1508
         _ExtentY        =   556
      End
      Begin ColorPicker.ColorPick pic1 
         Height          =   315
         Left            =   1200
         TabIndex        =   4
         Top             =   1680
         Width           =   855
         _ExtentX        =   1508
         _ExtentY        =   556
      End
      Begin VB.Label Label3 
         BackStyle       =   0  'z
         Caption         =   "to"
         BeginProperty Font 
            Name            =   "Tahoma"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   375
         Left            =   2160
         TabIndex        =   3
         Top             =   1680
         Width           =   735
      End
      Begin VB.Label Label2 
         BackStyle       =   0  'z
         Caption         =   "Fade from"
         BeginProperty Font 
            Name            =   "Tahoma"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   375
         Left            =   240
         TabIndex        =   2
         Top             =   1680
         Width           =   1095
      End
      Begin VB.Label Label1 
         BackStyle       =   0  'z
         Caption         =   "Text"
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   9
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   255
         Left            =   240
         TabIndex        =   1
         Top             =   360
         Width           =   1575
      End
   End
End
Attribute VB_Name = "frmTool_Rainbow"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Public TheDOM As IHTMLDocument2, TheCode As CodeMax, IsCreator As Boolean

Private Sub Command1_Click()
GenerateCode
End Sub

Sub GenerateCode()
rtc.text = RainbowColorText(rt1.text, pic1.Color, pic2.Color)
End Sub

Private Sub Command2_Click()
Dim out As String
out = RainbowColorText(rt1.text, pic1.Color, pic2.Color)
    Select Case IsCreator
        Case True
            InsertHTML True, out, TheDOM
            
        Case False
            InsertHTML False, out, , TheCode
        
    End Select
Me.Hide
End Sub

Private Sub Command3_Click()
Me.Hide
End Sub

Private Sub Form_Load()
FlattenSpc Me, "TextBox"
pic1.MakeMeFlat
pic2.MakeMeFlat
End Sub

Private Sub pic1_Click()
Me.rt1.SetFocus
End Sub

Private Sub pic2_Click()
Me.rt1.SetFocus
End Sub
