VERSION 5.00
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCTL.OCX"
Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "COMDLG32.OCX"
Begin VB.Form Options 
   BorderStyle     =   1  'Fixed Single
   Caption         =   "Virtual Hypnotist Screen Saver"
   ClientHeight    =   4770
   ClientLeft      =   3330
   ClientTop       =   2145
   ClientWidth     =   5145
   Icon            =   "Options.frx":0000
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   4770
   ScaleWidth      =   5145
   Begin MSComDlg.CommonDialog CommonDialog1 
      Left            =   0
      Top             =   0
      _ExtentX        =   847
      _ExtentY        =   847
      _Version        =   393216
   End
   Begin VB.CommandButton Command2 
      Caption         =   "Choose Virtual Hypnotist Installation to Use"
      Height          =   375
      Left            =   720
      TabIndex        =   8
      Top             =   1080
      Width           =   3615
   End
   Begin VB.Timer Timer1 
      Interval        =   50
      Left            =   0
      Top             =   960
   End
   Begin VB.Frame Frame1 
      Caption         =   "Options"
      Height          =   2655
      Left            =   120
      TabIndex        =   2
      Top             =   1560
      Width           =   4935
      Begin VB.CheckBox Check1 
         Caption         =   "Show Subliminal Control Panel"
         Height          =   375
         Left            =   240
         TabIndex        =   7
         Top             =   1920
         Value           =   1  'Checked
         Width           =   1695
      End
      Begin VB.FileListBox File1 
         Enabled         =   0   'False
         Height          =   1455
         Left            =   2160
         TabIndex        =   6
         Top             =   1080
         Width           =   2535
      End
      Begin MSComctlLib.Slider Slider1 
         Height          =   375
         Left            =   2160
         TabIndex        =   5
         Top             =   480
         Width           =   2535
         _ExtentX        =   4471
         _ExtentY        =   661
         _Version        =   393216
         Min             =   1
         Max             =   16
         SelStart        =   1
         Value           =   1
      End
      Begin VB.OptionButton Option2 
         Caption         =   "Run Saved Session"
         Height          =   255
         Left            =   240
         TabIndex        =   4
         Top             =   1200
         Width           =   1815
      End
      Begin VB.OptionButton Option1 
         Caption         =   "Run Preset"
         Height          =   255
         Left            =   240
         TabIndex        =   3
         Top             =   480
         Value           =   -1  'True
         Width           =   1095
      End
   End
   Begin VB.CommandButton Command1 
      Caption         =   "OK"
      Height          =   375
      Left            =   2040
      TabIndex        =   1
      Top             =   4320
      Width           =   1215
   End
   Begin VB.Label Label1 
      Alignment       =   2  'Center
      Caption         =   "Virtual Hypnotist Screen Saver"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   17.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   855
      Left            =   600
      TabIndex        =   0
      Top             =   120
      Width           =   3975
   End
End
Attribute VB_Name = "Options"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'Virtual Hypnotist Screen Saver
'©2005-2006 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.

Option Explicit

Private Sub Command1_Click()
SaveSetting "VH Screensaver", "Settings", "Preset", LTrim(Str$(Slider1.Value))
SaveSetting "VH Screensaver", "Settings", "Session", File1.FileName
SaveSetting "VH Screensaver", "Settings", "ControlPanel", LTrim(Str$(Check1.Value))

If Option1.Value = True Then
    SaveSetting "VH Screensaver", "Settings", "Mode", "1"
Else
    SaveSetting "VH Screensaver", "Settings", "Mode", "2"
End If
End
End Sub

Private Sub Command2_Click()
On Error GoTo ChooseCancel
Const MB_OK = 0, MB_OKCANCEL = 1    ' Define buttons.
Const MB_YESNOCANCEL = 3, MB_YESNO = 4
Const MB_ICONSTOP = 16, MB_ICONQUESTION = 32    ' Define Icons.
Const MB_ICONEXCLAMATION = 48, MB_ICONINFORMATION = 64
Const MB_DEFBUTTON2 = 256, IDYES = 6, IDNO = 7  ' Define other.
Dim DgDef, Msg, Response, Title ' Declare variables.
CommonDialog1.InitDir = "C:\Program Files\Virtual Hypnotist"
CommonDialog1.CancelError = True
CommonDialog1.DefaultExt = "vh.exe"
CommonDialog1.Filter = "Virtual Hypnotist Program (VH.EXE)|VH.EXE|"
CommonDialog1.DialogTitle = "Load Session"
CommonDialog1.Action = 1

VHPATH = Left$(CommonDialog1.FileName, Len(CommonDialog1.FileName) - 7)
SaveSetting "VH Screensaver", "Settings", "VH_PATH", VHPATH
Exit Sub

ChooseCancel:
Resume ChooseCancel2
ChooseCancel2:
Exit Sub
End Sub

Private Sub Form_Activate()
If FileExists(VHPATH + "\vh.exe") = True Then
File1.Path = VHPATH + "\sessions"
File1.Enabled = True
End If

End Sub

Private Sub Form_Load()
Me.Left = (Screen.Width / 2) - (Me.Width / 2)
Me.Top = (Screen.Height / 2) - (Me.Height / 2)

If FileExists(VHPATH + "\vh.exe") = False Then
    Call Command2_Click
End If

If FileExists(VHPATH + "\vh.exe") = True Then
    File1.Enabled = True
    File1.Path = VHPATH + "\sessions"
End If

End Sub

Private Sub Timer1_Timer()
If Option1.Value = True And File1.Enabled = True Then
    File1.Enabled = False
    Slider1.Enabled = True
End If
If Option2.Value = True And Slider1.Enabled = True Then
    File1.Enabled = True
    Slider1.Enabled = False
    If FileExists(VHPATH + "\vh.exe") = True Then
        File1.Enabled = True
        File1.Path = VHPATH + "\sessions"
    End If
End If
End Sub
