VERSION 5.00
Begin VB.Form Form1 
   BackColor       =   &H00000000&
   Caption         =   "ColorTunnel"
   ClientHeight    =   4710
   ClientLeft      =   3900
   ClientTop       =   3825
   ClientWidth     =   6990
   DrawWidth       =   2
   ForeColor       =   &H80000018&
   Icon            =   "Form1.frx":0000
   LinkTopic       =   "Form1"
   ScaleHeight     =   314
   ScaleMode       =   3  'Pixel
   ScaleWidth      =   466
   Begin VB.Timer Timer1 
      Enabled         =   0   'False
      Interval        =   1
      Left            =   240
      Top             =   120
   End
   Begin VB.Menu mnuMain 
      Caption         =   "&File"
      Begin VB.Menu mnuMainShow 
         Caption         =   "Show &control panel"
      End
      Begin VB.Menu mnuMainFull 
         Caption         =   "&Full Screen Mode"
      End
      Begin VB.Menu mnuMainWind 
         Caption         =   "&Windowed Mode"
         Enabled         =   0   'False
      End
      Begin VB.Menu mnuMainStart 
         Caption         =   "&Start tunnel"
      End
      Begin VB.Menu mnuMainStop 
         Caption         =   "St&op tunnel"
      End
      Begin VB.Menu mnuMainQuit 
         Caption         =   "&Quit"
      End
   End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'ColorTunnel 2.0
'©2005 FollowTheWatch Software
'http://vhypno.sourceforge.net
'http://sourceforge.net/projects/vhypno
'Contact - followthewatch55@yahoo.com

'This program is free software; you can redistribute it and/or
'modify it under the terms of the GNU General Public License
'as published by the Free Software Foundation; either version 2
'of the License, or (at your option) any later version.

'This program is distributed in the hope that it will be useful,
'but WITHOUT ANY WARRANTY; without even the implied warranty of
'MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
'GNU General Public License for more details.

'You should have received a copy of the GNU General Public License
'along with this program; if not, write to the Free Software
'Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.

Public ViewObject As Object
Option Explicit

Private Sub Form_Load()
    Me.Left = (Screen.Width / 2) - (Me.Width / 2)
    Me.Top = (Screen.Height / 2) - (Me.Height / 2)
    Me.Caption = "ColorTunnel " + LTrim$(Str$(App.Major)) + "." + LTrim$(Str$(App.Minor))
    Set ViewObject = Me
    cbf = 0
    CircleSize = 100
    CircleRadius = 1
    CircleWidth = 2
    CircleCycle = 1
    CircleSpeedR = 1
    CircleSpeedG = 1
    CircleSpeedB = 1
    RLower = 5
    GLower = 2
    BLower = 3
    RUpper = 255
    GUpper = 254
    BUpper = 252
    Form2.ScrollBar4.Value = CircleSize
    Form2.ScrollBar5.Value = CircleRadius * 100
    Form2.ScrollBar6.Value = CircleWidth
    Form2.ScrollBar7.Value = CircleCycle
    Form2.ScrollBar8.Value = CircleSpeedR
    Form2.ScrollBar9.Value = CircleSpeedG
    Form2.ScrollBar10.Value = CircleSpeedB
    Form2.Show
    Me.Show
    Timer1.Enabled = True
End Sub

Private Sub Form_Resize()
Me.Cls
InitTunnel = False
End Sub

Private Sub Form_Unload(Cancel As Integer)
End
End Sub

Private Sub mnuMainFull_Click()
Form3.DrawWidth = Me.DrawWidth
Form3.Show
Set ViewObject = Form3
mnuMainFull.Enabled = False
mnuMainWind.Enabled = True
InitTunnel = False
ViewObject.Cls
End Sub

Private Sub mnuMainQuit_Click()
End
End Sub

Private Sub mnuMainShow_Click()
Form2.Show
End Sub

Private Sub mnuMainStart_Click()
Timer1.Enabled = True
End Sub

Private Sub mnuMainStop_Click()
Timer1.Enabled = False
End Sub

Private Sub mnuMainWind_Click()
Set ViewObject = Me
Form3.Hide
mnuMainFull.Enabled = True
mnuMainWind.Enabled = False
InitTunnel = False
ViewObject.Cls
End Sub

Private Sub Timer1_Timer()
If cbf = 0 Then rtnCircleForward ViewObject
If cbf = 1 Then rtnCircleBackward ViewObject
End Sub

Private Sub Form_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = 1 Then InitTunnel = False
If Button = 2 Then PopupMenu mnuMain
End Sub

