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"
Object = "{86CF1D34-0C5F-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCT2.OCX"
Object = "{BDC217C8-ED16-11CD-956C-0000C04E4C0A}#1.1#0"; "TABCTL32.OCX"
Begin VB.Form frmSession 
   BorderStyle     =   1  'Fixed Single
   Caption         =   "Hypnosis Session Configuration"
   ClientHeight    =   6705
   ClientLeft      =   3105
   ClientTop       =   2595
   ClientWidth     =   8520
   ControlBox      =   0   'False
   Icon            =   "frmSession.frx":0000
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   6705
   ScaleWidth      =   8520
   Begin VB.CommandButton cmdHelp 
      Caption         =   "Help"
      Height          =   375
      Left            =   6960
      TabIndex        =   247
      ToolTipText     =   "Help on session configurations"
      Top             =   6240
      Width           =   1215
   End
   Begin VB.CommandButton cmdMakePackage 
      Caption         =   "Make Package"
      Height          =   375
      Left            =   5520
      TabIndex        =   231
      ToolTipText     =   "Create a VH package containing the session's scripts and multimedia, to share with others"
      Top             =   6240
      Width           =   1335
   End
   Begin VB.CommandButton cmdPreset 
      Caption         =   "Preset..."
      Height          =   375
      Left            =   4200
      TabIndex        =   4
      ToolTipText     =   "Select from a list of presets"
      Top             =   6240
      Width           =   1215
   End
   Begin VB.CommandButton cmdLoadSession 
      Caption         =   "Load Session"
      Height          =   375
      Left            =   1560
      TabIndex        =   2
      ToolTipText     =   "Load session from a file"
      Top             =   6240
      Width           =   1215
   End
   Begin VB.CommandButton cmdSaveSession 
      Caption         =   "Save Session"
      Height          =   375
      Left            =   2880
      TabIndex        =   3
      ToolTipText     =   "Save session to a file"
      Top             =   6240
      Width           =   1215
   End
   Begin VB.CommandButton cmdOK 
      Caption         =   "OK"
      Height          =   375
      Left            =   240
      TabIndex        =   1
      Top             =   6240
      Width           =   1215
   End
   Begin TabDlg.SSTab SSTab1 
      Height          =   6015
      Left            =   120
      TabIndex        =   0
      Top             =   120
      Width           =   8295
      _ExtentX        =   14631
      _ExtentY        =   10610
      _Version        =   393216
      Style           =   1
      Tabs            =   8
      TabsPerRow      =   8
      TabHeight       =   520
      ShowFocusRect   =   0   'False
      TabCaption(0)   =   "Information"
      TabPicture(0)   =   "frmSession.frx":08CA
      Tab(0).ControlEnabled=   -1  'True
      Tab(0).Control(0)=   "lblSessionDate"
      Tab(0).Control(0).Enabled=   0   'False
      Tab(0).Control(1)=   "lblSessionFormat"
      Tab(0).Control(1).Enabled=   0   'False
      Tab(0).Control(2)=   "lblFileFormat"
      Tab(0).Control(2).Enabled=   0   'False
      Tab(0).Control(3)=   "lblSessionName"
      Tab(0).Control(3).Enabled=   0   'False
      Tab(0).Control(4)=   "lblDate"
      Tab(0).Control(4).Enabled=   0   'False
      Tab(0).Control(5)=   "lblAuthor"
      Tab(0).Control(5).Enabled=   0   'False
      Tab(0).Control(6)=   "lblComments"
      Tab(0).Control(6).Enabled=   0   'False
      Tab(0).Control(7)=   "imgLogo"
      Tab(0).Control(7).Enabled=   0   'False
      Tab(0).Control(8)=   "lblConfig"
      Tab(0).Control(8).Enabled=   0   'False
      Tab(0).Control(9)=   "framePerfMon"
      Tab(0).Control(9).Enabled=   0   'False
      Tab(0).Control(10)=   "txtSessionName"
      Tab(0).Control(10).Enabled=   0   'False
      Tab(0).Control(11)=   "txtSessionAuthor"
      Tab(0).Control(11).Enabled=   0   'False
      Tab(0).Control(12)=   "txtSessionComments"
      Tab(0).Control(12).Enabled=   0   'False
      Tab(0).ControlCount=   13
      TabCaption(1)   =   "General"
      TabPicture(1)   =   "frmSession.frx":08E6
      Tab(1).ControlEnabled=   0   'False
      Tab(1).Control(0)=   "frameScreenRes"
      Tab(1).Control(1)=   "frameSessionStart"
      Tab(1).Control(2)=   "frameSessionType"
      Tab(1).Control(3)=   "ResTimer"
      Tab(1).Control(4)=   "frameSessionOptions"
      Tab(1).Control(5)=   "frameScreenSize"
      Tab(1).Control(6)=   "CheckTimer1"
      Tab(1).Control(7)=   "Frame1"
      Tab(1).ControlCount=   8
      TabCaption(2)   =   "Components"
      TabPicture(2)   =   "frmSession.frx":0902
      Tab(2).ControlEnabled=   0   'False
      Tab(2).Control(0)=   "cmdChooseURL"
      Tab(2).Control(1)=   "frameScripts"
      Tab(2).Control(2)=   "fileAudio"
      Tab(2).Control(3)=   "fileSubliminals"
      Tab(2).Control(4)=   "fileCharacter"
      Tab(2).Control(5)=   "fileVideo"
      Tab(2).Control(6)=   "fileWakener"
      Tab(2).Control(7)=   "fileSuggestions"
      Tab(2).Control(8)=   "fileDeepener"
      Tab(2).Control(9)=   "fileInduction"
      Tab(2).Control(10)=   "frameComponents"
      Tab(2).Control(11)=   "lblAudio"
      Tab(2).Control(12)=   "lblCharacter"
      Tab(2).Control(13)=   "lblVideo"
      Tab(2).Control(14)=   "lblWakener"
      Tab(2).Control(15)=   "lblSuggestions"
      Tab(2).Control(16)=   "lblDeepener"
      Tab(2).Control(17)=   "lblInduction"
      Tab(2).Control(18)=   "lblSubliminals"
      Tab(2).ControlCount=   19
      TabCaption(3)   =   "Speech Synthesis"
      TabPicture(3)   =   "frmSession.frx":091E
      Tab(3).ControlEnabled=   0   'False
      Tab(3).Control(0)=   "lblTextSpeak"
      Tab(3).Control(1)=   "frameVoiceSettings"
      Tab(3).Control(2)=   "fraDetails"
      Tab(3).Control(3)=   "cmdSpeakStop"
      Tab(3).Control(4)=   "txtSpeakTest"
      Tab(3).Control(5)=   "cmdSpeakText"
      Tab(3).ControlCount=   6
      TabCaption(4)   =   "Graphics and Audio"
      TabPicture(4)   =   "frmSession.frx":093A
      Tab(4).ControlEnabled=   0   'False
      Tab(4).Control(0)=   "frameGraphics"
      Tab(4).Control(1)=   "frameAudioVolume"
      Tab(4).Control(2)=   "frameCustomAudio"
      Tab(4).Control(3)=   "frameSpeedSettings"
      Tab(4).Control(4)=   "frameFlash"
      Tab(4).Control(5)=   "frameAudioBalance"
      Tab(4).ControlCount=   6
      TabCaption(5)   =   "Subliminals"
      TabPicture(5)   =   "frmSession.frx":0956
      Tab(5).ControlEnabled=   0   'False
      Tab(5).Control(0)=   "framePopupSub"
      Tab(5).Control(1)=   "frameFlasherSub"
      Tab(5).ControlCount=   2
      TabCaption(6)   =   "3D"
      TabPicture(6)   =   "frmSession.frx":0972
      Tab(6).ControlEnabled=   0   'False
      Tab(6).Control(0)=   "frame3DVisualType"
      Tab(6).ControlCount=   1
      TabCaption(7)   =   "Other"
      TabPicture(7)   =   "frmSession.frx":098E
      Tab(7).ControlEnabled=   0   'False
      Tab(7).Control(0)=   "cmdBrainwave"
      Tab(7).Control(1)=   "cmdVisMaker"
      Tab(7).Control(2)=   "cmdFileEditor"
      Tab(7).Control(3)=   "Label1"
      Tab(7).ControlCount=   4
      Begin VB.CommandButton cmdChooseURL 
         Caption         =   "Choose from URL"
         Height          =   735
         Left            =   -74880
         TabIndex        =   249
         ToolTipText     =   "Click here to load a file from a URL for any of the below sections, instead of using local files"
         Top             =   960
         Width           =   735
      End
      Begin VB.Frame frameAudioBalance 
         Caption         =   "Audio Balance"
         Height          =   2385
         Left            =   -69360
         TabIndex        =   216
         Top             =   2530
         Width           =   2415
         Begin VB.HScrollBar balBackground 
            Height          =   225
            Left            =   240
            Max             =   100
            Min             =   -100
            TabIndex        =   222
            Top             =   600
            Width           =   1935
         End
         Begin VB.HScrollBar balCustom 
            Height          =   225
            Left            =   240
            Max             =   100
            Min             =   -100
            TabIndex        =   221
            Top             =   1200
            Width           =   1935
         End
         Begin VB.HScrollBar balVideo 
            Height          =   225
            Left            =   240
            Max             =   100
            Min             =   -100
            TabIndex        =   220
            Top             =   1800
            Width           =   1935
         End
         Begin VB.Label lblVidBal 
            Alignment       =   2  'Center
            BorderStyle     =   1  'Fixed Single
            Caption         =   "0"
            Height          =   255
            Left            =   1560
            TabIndex        =   225
            Top             =   1500
            Width           =   495
         End
         Begin VB.Label lblCustBal 
            Alignment       =   2  'Center
            BorderStyle     =   1  'Fixed Single
            Caption         =   "0"
            Height          =   255
            Left            =   1560
            TabIndex        =   224
            Top             =   900
            Width           =   495
         End
         Begin VB.Label lblBackBal 
            Alignment       =   2  'Center
            BorderStyle     =   1  'Fixed Single
            Caption         =   "0"
            Height          =   255
            Left            =   1560
            TabIndex        =   223
            Top             =   285
            Width           =   495
         End
         Begin VB.Label lblBackBalance 
            Alignment       =   2  'Center
            Caption         =   "Background"
            Height          =   195
            Left            =   240
            TabIndex        =   219
            ToolTipText     =   "Change the background audio volume"
            Top             =   345
            Width           =   1335
         End
         Begin VB.Label lblCustBalance 
            Alignment       =   2  'Center
            Caption         =   "Custom"
            Height          =   195
            Left            =   360
            TabIndex        =   218
            ToolTipText     =   "Change the custom audio volume"
            Top             =   960
            Width           =   1095
         End
         Begin VB.Label lblVidBalance 
            Alignment       =   2  'Center
            Caption         =   "Video"
            Height          =   195
            Left            =   345
            TabIndex        =   217
            ToolTipText     =   "Change the video volume"
            Top             =   1560
            Width           =   1095
         End
      End
      Begin VB.Frame frame3DVisualType 
         Caption         =   "Choose a 3D Visual"
         Height          =   2175
         Left            =   -72720
         TabIndex        =   183
         Top             =   1320
         Width           =   3735
         Begin VB.OptionButton optHypnoCoaster 
            Caption         =   "Hypnotic Roller Coaster"
            Height          =   375
            Left            =   840
            TabIndex        =   186
            ToolTipText     =   "Use the Hypnotic Roller Coaster 3D visual"
            Top             =   1080
            Width           =   2175
         End
         Begin VB.OptionButton optHypnoMachine 
            Caption         =   "Hypnotizing Machine"
            Height          =   375
            Left            =   840
            TabIndex        =   184
            ToolTipText     =   "Use the Hypnotizing Machine 3D visual"
            Top             =   720
            Value           =   -1  'True
            Width           =   1815
         End
      End
      Begin VB.CommandButton cmdBrainwave 
         Caption         =   "Brainwave Synchronizer"
         Height          =   375
         Left            =   -72000
         TabIndex        =   187
         ToolTipText     =   "Configure brainwave synchronizer"
         Top             =   1680
         Width           =   2295
      End
      Begin VB.CommandButton cmdVisMaker 
         Caption         =   "Hypnotic Visual Maker"
         Height          =   375
         Left            =   -72000
         TabIndex        =   188
         ToolTipText     =   "Configure custom hypnotic visuals"
         Top             =   2160
         Width           =   2295
      End
      Begin VB.CommandButton cmdFileEditor 
         Caption         =   "Session File Editor"
         Height          =   375
         Left            =   -72000
         TabIndex        =   189
         ToolTipText     =   "Directly edit saved session files"
         Top             =   2640
         Width           =   2295
      End
      Begin VB.Frame Frame1 
         Caption         =   "Text-Only Session Options"
         Height          =   3015
         Left            =   -69720
         TabIndex        =   57
         Top             =   2880
         Width           =   2775
         Begin VB.CommandButton cmdTextOnlyFont 
            Caption         =   "Set Font"
            Height          =   255
            Left            =   840
            TabIndex        =   61
            ToolTipText     =   "Set font of displayed text"
            Top             =   1200
            Width           =   1215
         End
         Begin VB.CommandButton cmdTextColorBack 
            Caption         =   "Set Back Color"
            Height          =   255
            Left            =   1440
            TabIndex        =   59
            ToolTipText     =   "Set background color of the displayed text"
            Top             =   360
            Width           =   1215
         End
         Begin VB.CommandButton cmdTextColor 
            Caption         =   "Set Text Color"
            Height          =   255
            Left            =   120
            TabIndex        =   58
            ToolTipText     =   "Set color of the displayed text"
            Top             =   360
            Width           =   1215
         End
         Begin MSComctlLib.Slider sliderTextSpeed 
            Height          =   435
            Left            =   240
            TabIndex        =   229
            ToolTipText     =   "Sets the amount of time (in milliseconds) the text stays on the screen"
            Top             =   1800
            Width           =   2400
            _ExtentX        =   4233
            _ExtentY        =   767
            _Version        =   393216
            Min             =   100
            Max             =   20000
            SelStart        =   5000
            TickFrequency   =   700
            Value           =   5000
         End
         Begin MSComctlLib.Slider sliderTextFadeSpeed 
            Height          =   435
            Left            =   240
            TabIndex        =   232
            ToolTipText     =   "Sets how long the text fades in and out"
            Top             =   2520
            Width           =   2400
            _ExtentX        =   4233
            _ExtentY        =   767
            _Version        =   393216
            Min             =   1
            Max             =   30
            SelStart        =   4
            Value           =   4
         End
         Begin VB.Label lblTextFadeSpeed 
            Alignment       =   2  'Center
            Caption         =   "Text Fading Speed"
            Height          =   255
            Left            =   360
            TabIndex        =   233
            Top             =   2280
            Width           =   2175
         End
         Begin VB.Label lblTextSpeed 
            Alignment       =   2  'Center
            Caption         =   "Text Duration (if speech is off)"
            Height          =   255
            Left            =   360
            TabIndex        =   230
            Top             =   1560
            Width           =   2175
         End
         Begin VB.Label lblTextOnlySample 
            Alignment       =   2  'Center
            BackColor       =   &H00000000&
            Caption         =   "Sample"
            BeginProperty Font 
               Name            =   "MS Sans Serif"
               Size            =   12
               Charset         =   0
               Weight          =   700
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            ForeColor       =   &H00FFFFFF&
            Height          =   375
            Left            =   120
            TabIndex        =   60
            ToolTipText     =   "Example session text"
            Top             =   720
            Width           =   2535
         End
      End
      Begin VB.Timer CheckTimer1 
         Interval        =   100
         Left            =   -67200
         Top             =   360
      End
      Begin VB.Frame frameScreenSize 
         Caption         =   "Screen Size"
         Height          =   2295
         Left            =   -72240
         TabIndex        =   50
         Top             =   2880
         Width           =   2415
         Begin VB.TextBox txtVertSize 
            Alignment       =   2  'Center
            Height          =   330
            Left            =   1440
            TabIndex        =   56
            Text            =   "600"
            ToolTipText     =   "Vertical size of session window, for windowed mode"
            Top             =   1680
            Width           =   615
         End
         Begin VB.TextBox txtHorizSize 
            Alignment       =   2  'Center
            Height          =   330
            Left            =   360
            TabIndex        =   54
            Text            =   "800"
            ToolTipText     =   "Horizontal size of session window, for windowed mode"
            Top             =   1680
            Width           =   615
         End
         Begin VB.OptionButton optWindowed 
            Caption         =   "Windowed"
            Height          =   255
            Left            =   120
            TabIndex        =   52
            ToolTipText     =   "Run sessions in windowed mode"
            Top             =   840
            Width           =   1335
         End
         Begin VB.OptionButton optFullScreen 
            Caption         =   "Full Screen (default)"
            Height          =   255
            Left            =   120
            TabIndex        =   51
            ToolTipText     =   "Run sessions in full-screen mode"
            Top             =   480
            Value           =   -1  'True
            Width           =   1815
         End
         Begin VB.Label lblScreenVertSize 
            Alignment       =   2  'Center
            Caption         =   "Vertical Size"
            Height          =   375
            Left            =   1320
            TabIndex        =   55
            Top             =   1200
            Width           =   855
         End
         Begin VB.Label lblScreenHorizSize 
            Alignment       =   2  'Center
            Caption         =   "Horizontal Size"
            Height          =   375
            Left            =   240
            TabIndex        =   53
            Top             =   1200
            Width           =   855
         End
      End
      Begin VB.Frame frameScripts 
         Caption         =   "Scripts"
         Height          =   1665
         Left            =   -74040
         TabIndex        =   62
         Top             =   480
         Width           =   2055
         Begin VB.CheckBox chkEnableInduction 
            Caption         =   "Enable Induction"
            Height          =   255
            Left            =   120
            TabIndex        =   63
            ToolTipText     =   "Use induction during session"
            Top             =   240
            Value           =   1  'Checked
            Width           =   1695
         End
         Begin VB.CheckBox chkEnableDeepener 
            Caption         =   "Enable Deepener"
            Height          =   255
            Left            =   120
            TabIndex        =   64
            ToolTipText     =   "Use deepener during session"
            Top             =   480
            Value           =   1  'Checked
            Width           =   1695
         End
         Begin VB.CheckBox chkEnableSuggestions 
            Caption         =   "Enable Suggestions"
            Height          =   255
            Left            =   120
            TabIndex        =   65
            ToolTipText     =   "Use suggestions during session"
            Top             =   720
            Value           =   1  'Checked
            Width           =   1815
         End
         Begin VB.CheckBox chkEnableWakener 
            Caption         =   "Enable Wakener"
            Height          =   255
            Left            =   120
            TabIndex        =   66
            ToolTipText     =   "Use wakening during session"
            Top             =   960
            Value           =   1  'Checked
            Width           =   1695
         End
         Begin VB.CheckBox chkEnableSubliminals 
            Caption         =   "Enable Subliminals"
            Height          =   255
            Left            =   120
            TabIndex        =   67
            ToolTipText     =   "Enable subliminals during session"
            Top             =   1200
            Value           =   1  'Checked
            Width           =   1695
         End
      End
      Begin VB.FileListBox fileAudio 
         Height          =   1455
         Left            =   -74640
         TabIndex        =   87
         ToolTipText     =   "Choose an audio file (double-click to hear)"
         Top             =   4440
         Width           =   1935
      End
      Begin VB.FileListBox fileSubliminals 
         Height          =   1455
         Left            =   -68880
         TabIndex        =   93
         ToolTipText     =   "Choose a subliminals file (double-click to edit it)"
         Top             =   4440
         Width           =   1935
      End
      Begin VB.FileListBox fileCharacter 
         Height          =   1455
         Left            =   -70800
         TabIndex        =   91
         ToolTipText     =   "Choose a character file"
         Top             =   4440
         Width           =   1935
      End
      Begin VB.FileListBox fileVideo 
         Height          =   1455
         Left            =   -72720
         TabIndex        =   89
         ToolTipText     =   "Choose a video file (double-click to view)"
         Top             =   4440
         Width           =   1935
      End
      Begin VB.FileListBox fileWakener 
         Height          =   1455
         Left            =   -68880
         TabIndex        =   85
         ToolTipText     =   "Choose a wakener file (double-click to edit it)"
         Top             =   2640
         Width           =   1935
      End
      Begin VB.FileListBox fileSuggestions 
         Height          =   1455
         Left            =   -70800
         TabIndex        =   83
         ToolTipText     =   "Choose a suggestions file (double-click to edit it)"
         Top             =   2640
         Width           =   1935
      End
      Begin VB.FileListBox fileDeepener 
         Height          =   1455
         Left            =   -72720
         TabIndex        =   81
         ToolTipText     =   "Choose a deepener file (double-click to edit it)"
         Top             =   2640
         Width           =   1935
      End
      Begin VB.FileListBox fileInduction 
         Height          =   1455
         Left            =   -74640
         TabIndex        =   79
         ToolTipText     =   "Choose an induction file (double-click to edit it)"
         Top             =   2640
         Width           =   1935
      End
      Begin VB.Frame frameComponents 
         Caption         =   "Components"
         Height          =   1665
         Left            =   -71880
         TabIndex        =   68
         Top             =   480
         Width           =   4935
         Begin VB.CheckBox chkEnable3D 
            Caption         =   "Enable 3D Graphics"
            Height          =   255
            Left            =   120
            TabIndex        =   73
            ToolTipText     =   "Enable 3D graphics during session"
            Top             =   1260
            Width           =   2055
         End
         Begin VB.CheckBox chkTextOnly 
            Caption         =   "Text-Only Session (speech on if grayed, otherwise off)"
            Height          =   435
            Left            =   2280
            TabIndex        =   77
            ToolTipText     =   "Use visible text during sessions.  If checkbox is grayed, speech will still be processed. Otherwise speech is off."
            Top             =   1020
            Width           =   2535
         End
         Begin VB.CheckBox chkEnableCustom 
            Caption         =   "Enable Custom Audio"
            Height          =   255
            Left            =   120
            TabIndex        =   72
            ToolTipText     =   "Enable custom audio file during session"
            Top             =   1020
            Width           =   2055
         End
         Begin VB.CheckBox chkEnableVisuals 
            Caption         =   "Enable Custom Visuals"
            Height          =   255
            Left            =   2280
            TabIndex        =   76
            ToolTipText     =   "Enable custom Visual Maker visuals during the session"
            Top             =   780
            Width           =   2055
         End
         Begin VB.CheckBox chkEnableFlashers 
            Caption         =   "Enable Flashers"
            Height          =   255
            Left            =   2280
            TabIndex        =   75
            ToolTipText     =   "Enable flasher bars during session"
            Top             =   540
            Width           =   1695
         End
         Begin VB.CheckBox chkEnableBinaural 
            Caption         =   "Enable Brainwaves"
            Height          =   255
            Left            =   2280
            TabIndex        =   74
            ToolTipText     =   "Enable brainwave synchronizer during session"
            Top             =   330
            Width           =   1695
         End
         Begin VB.CheckBox chkEnableAudio 
            Caption         =   "Enable Audio File"
            Height          =   255
            Left            =   120
            TabIndex        =   71
            ToolTipText     =   "Enable audio file during session"
            Top             =   780
            Value           =   1  'Checked
            Width           =   1695
         End
         Begin VB.CheckBox chkEnableChar 
            Caption         =   "Enable Visible Character"
            Height          =   255
            Left            =   120
            TabIndex        =   70
            ToolTipText     =   "Show animated character during session (note - more speech options are available when this is unchecked)"
            Top             =   540
            Value           =   1  'Checked
            Width           =   2055
         End
         Begin VB.CheckBox chkEnableVideo 
            Caption         =   "Enable Video"
            Height          =   195
            Left            =   120
            TabIndex        =   69
            ToolTipText     =   "Enable background video during session"
            Top             =   330
            Value           =   1  'Checked
            Width           =   1455
         End
      End
      Begin VB.CommandButton cmdSpeakText 
         Caption         =   "Speak text"
         Height          =   375
         Left            =   -70320
         TabIndex        =   114
         ToolTipText     =   "Type some text into the text box, then press this button to hear it"
         Top             =   5520
         Width           =   1335
      End
      Begin VB.TextBox txtSpeakTest 
         Height          =   1095
         Left            =   -71040
         MultiLine       =   -1  'True
         ScrollBars      =   3  'Both
         TabIndex        =   113
         Text            =   "frmSession.frx":09AA
         Top             =   4320
         Width           =   3975
      End
      Begin VB.CommandButton cmdSpeakStop 
         Caption         =   "Stop"
         Height          =   375
         Left            =   -68880
         TabIndex        =   115
         ToolTipText     =   "Stop speaking"
         Top             =   5520
         Width           =   1215
      End
      Begin VB.Frame fraDetails 
         Caption         =   "Voice Details"
         Height          =   3675
         Left            =   -71280
         TabIndex        =   94
         Top             =   360
         Width           =   4455
         Begin VB.TextBox txtModeID 
            BackColor       =   &H00E0E0E0&
            Height          =   255
            Left            =   960
            Locked          =   -1  'True
            TabIndex        =   201
            Top             =   540
            Width           =   3375
         End
         Begin VB.TextBox txtDialect 
            BackColor       =   &H00E0E0E0&
            Height          =   285
            Left            =   960
            Locked          =   -1  'True
            TabIndex        =   200
            Top             =   1800
            Width           =   3375
         End
         Begin VB.TextBox txtFeatures 
            BackColor       =   &H00E0E0E0&
            Height          =   285
            Left            =   960
            Locked          =   -1  'True
            TabIndex        =   199
            Top             =   3180
            Width           =   1095
         End
         Begin VB.TextBox txtGender 
            BackColor       =   &H00E0E0E0&
            Height          =   285
            Left            =   960
            Locked          =   -1  'True
            TabIndex        =   198
            Top             =   1170
            Width           =   1095
         End
         Begin VB.TextBox txtInterfaces 
            BackColor       =   &H00E0E0E0&
            Height          =   285
            Left            =   3240
            Locked          =   -1  'True
            TabIndex        =   197
            Top             =   3180
            Width           =   1095
         End
         Begin VB.TextBox txtLanguageID 
            BackColor       =   &H00E0E0E0&
            Height          =   285
            Left            =   960
            Locked          =   -1  'True
            TabIndex        =   196
            Top             =   1485
            Width           =   1095
         End
         Begin VB.TextBox txtMfgName 
            BackColor       =   &H00E0E0E0&
            Height          =   285
            Left            =   960
            Locked          =   -1  'True
            TabIndex        =   195
            Top             =   2490
            Width           =   3375
         End
         Begin VB.TextBox txtModeName 
            BackColor       =   &H00E0E0E0&
            Height          =   255
            Left            =   960
            Locked          =   -1  'True
            TabIndex        =   194
            Top             =   240
            Width           =   3375
         End
         Begin VB.TextBox txtProductName 
            BackColor       =   &H00E0E0E0&
            Height          =   285
            Left            =   960
            Locked          =   -1  'True
            TabIndex        =   193
            Top             =   2835
            Width           =   3375
         End
         Begin VB.TextBox txtSpeaker 
            BackColor       =   &H00E0E0E0&
            Height          =   285
            Left            =   960
            Locked          =   -1  'True
            TabIndex        =   192
            Top             =   840
            Width           =   3375
         End
         Begin VB.TextBox txtStyle 
            BackColor       =   &H00E0E0E0&
            Height          =   285
            Left            =   960
            Locked          =   -1  'True
            TabIndex        =   191
            Top             =   2145
            Width           =   3375
         End
         Begin VB.TextBox txtAge 
            BackColor       =   &H00E0E0E0&
            Height          =   315
            Left            =   3060
            Locked          =   -1  'True
            TabIndex        =   190
            Top             =   1170
            Width           =   1275
         End
         Begin VB.Label lblModeID 
            Alignment       =   1  'Right Justify
            Caption         =   "ModeID:"
            Height          =   255
            Left            =   240
            TabIndex        =   213
            Top             =   540
            Width           =   675
         End
         Begin VB.Label lblDialect 
            Alignment       =   1  'Right Justify
            Caption         =   "Dialect:"
            Height          =   255
            Left            =   360
            TabIndex        =   212
            Top             =   1830
            Width           =   555
         End
         Begin VB.Label lblFeatures 
            Alignment       =   1  'Right Justify
            Caption         =   "Features:"
            Height          =   255
            Left            =   240
            TabIndex        =   211
            Top             =   3195
            Width           =   675
         End
         Begin VB.Label lblVoiceGender 
            Alignment       =   1  'Right Justify
            Caption         =   "Gender:"
            Height          =   255
            Left            =   360
            TabIndex        =   210
            Top             =   1200
            Width           =   555
         End
         Begin VB.Label lblInterfaces 
            Alignment       =   1  'Right Justify
            Caption         =   "Interfaces:"
            Height          =   255
            Left            =   2400
            TabIndex        =   209
            Top             =   3195
            Width           =   825
         End
         Begin VB.Label lblLangID 
            Alignment       =   1  'Right Justify
            Caption         =   "LangID:"
            Height          =   255
            Left            =   360
            TabIndex        =   208
            Top             =   1500
            Width           =   555
         End
         Begin VB.Label lblMfgName 
            Alignment       =   1  'Right Justify
            Caption         =   "MfgName:"
            Height          =   255
            Left            =   120
            TabIndex        =   207
            Top             =   2505
            Width           =   795
         End
         Begin VB.Label lblModeName 
            Alignment       =   1  'Right Justify
            Caption         =   "Mode:"
            Height          =   255
            Left            =   360
            TabIndex        =   206
            Top             =   240
            Width           =   555
         End
         Begin VB.Label lblProdName 
            Alignment       =   1  'Right Justify
            Caption         =   "Product:"
            Height          =   255
            Left            =   240
            TabIndex        =   205
            Top             =   2850
            Width           =   675
         End
         Begin VB.Label lblSpeaker 
            Alignment       =   1  'Right Justify
            Caption         =   "Speaker:"
            Height          =   255
            Left            =   240
            TabIndex        =   204
            Top             =   825
            Width           =   675
         End
         Begin VB.Label lblStyle 
            Alignment       =   1  'Right Justify
            Caption         =   "Style:"
            Height          =   255
            Left            =   480
            TabIndex        =   203
            Top             =   2145
            Width           =   435
         End
         Begin VB.Label lblVoiceAge 
            Alignment       =   1  'Right Justify
            Caption         =   "Age:"
            Height          =   255
            Left            =   2400
            TabIndex        =   202
            Top             =   1200
            Width           =   555
         End
      End
      Begin VB.Frame frameVoiceSettings 
         Caption         =   "Voice Settings"
         Height          =   5535
         Left            =   -74760
         TabIndex        =   95
         Top             =   360
         Width           =   3375
         Begin VB.ComboBox txtTTS 
            Height          =   315
            ItemData        =   "frmSession.frx":09BC
            Left            =   240
            List            =   "frmSession.frx":09BE
            Style           =   2  'Dropdown List
            TabIndex        =   97
            ToolTipText     =   "List of available voices on your computer"
            Top             =   480
            Width           =   2940
         End
         Begin VB.ComboBox FormatCB 
            Height          =   315
            Left            =   240
            Style           =   2  'Dropdown List
            TabIndex        =   109
            ToolTipText     =   "SAPI5 voice format"
            Top             =   4320
            Width           =   2940
         End
         Begin VB.ComboBox AudioOutputCB 
            Height          =   315
            ItemData        =   "frmSession.frx":09C0
            Left            =   240
            List            =   "frmSession.frx":09C2
            Style           =   2  'Dropdown List
            TabIndex        =   111
            ToolTipText     =   "Device to use for SAPI5 audio output"
            Top             =   5040
            Width           =   2940
         End
         Begin VB.CheckBox chkMonotone 
            Caption         =   "Monotone"
            Height          =   255
            Left            =   480
            TabIndex        =   98
            ToolTipText     =   "Speak in monotone"
            Top             =   960
            Width           =   1095
         End
         Begin VB.CheckBox chkWhisper 
            Caption         =   "Whisper"
            Height          =   255
            Left            =   1800
            TabIndex        =   99
            ToolTipText     =   "Speak in a whisper"
            Top             =   960
            Width           =   975
         End
         Begin MSComctlLib.Slider sliderVoicePitch 
            Height          =   405
            Left            =   120
            TabIndex        =   101
            ToolTipText     =   "Voice Pitch"
            Top             =   1515
            Width           =   3135
            _ExtentX        =   5530
            _ExtentY        =   714
            _Version        =   393216
            Min             =   50
            Max             =   400
            SelStart        =   75
            TickFrequency   =   10
            Value           =   75
            TextPosition    =   1
         End
         Begin MSComctlLib.Slider sliderVoiceSpeed 
            Height          =   435
            Left            =   120
            TabIndex        =   103
            ToolTipText     =   "Voice Speed"
            Top             =   2220
            Width           =   3135
            _ExtentX        =   5530
            _ExtentY        =   767
            _Version        =   393216
            Min             =   50
            Max             =   250
            SelStart        =   100
            TickFrequency   =   5
            Value           =   100
            TextPosition    =   1
         End
         Begin MSComctlLib.Slider sliderVoiceVolume 
            Height          =   345
            Left            =   120
            TabIndex        =   105
            ToolTipText     =   "Voice Volume"
            Top             =   2880
            Width           =   3135
            _ExtentX        =   5530
            _ExtentY        =   609
            _Version        =   393216
            Min             =   1
            Max             =   65535
            SelStart        =   32767
            TickFrequency   =   2000
            Value           =   32767
            TextPosition    =   1
         End
         Begin MSComctlLib.Slider sliderPauseTime 
            Height          =   345
            Left            =   120
            TabIndex        =   107
            ToolTipText     =   "Amount of time in milliseconds that the program will pause for between sentences"
            Top             =   3600
            Width           =   3135
            _ExtentX        =   5530
            _ExtentY        =   609
            _Version        =   393216
            Min             =   100
            Max             =   20000
            SelStart        =   5000
            TickFrequency   =   700
            Value           =   5000
            TextPosition    =   1
         End
         Begin VB.Label lblPauseTime 
            Alignment       =   2  'Center
            Caption         =   "Pause Time (SAPI5)"
            Height          =   255
            Left            =   120
            TabIndex        =   106
            Top             =   3360
            Width           =   3135
         End
         Begin VB.Label lblVoice 
            Alignment       =   2  'Center
            Caption         =   "Voice"
            Height          =   255
            Left            =   240
            TabIndex        =   96
            Top             =   240
            Width           =   2895
         End
         Begin VB.Label lblFormatCB 
            Alignment       =   2  'Center
            Caption         =   "Format (SAPI5)"
            Height          =   255
            Left            =   240
            TabIndex        =   108
            Top             =   4080
            Width           =   2895
         End
         Begin VB.Label lblAudioOutCB 
            Alignment       =   2  'Center
            Caption         =   "Audio Output (SAPI5)"
            Height          =   255
            Left            =   240
            TabIndex        =   110
            Top             =   4800
            Width           =   2895
         End
         Begin VB.Label lblVoicePitch 
            Alignment       =   2  'Center
            Caption         =   "Voice Pitch, in HZ"
            Height          =   255
            Left            =   720
            TabIndex        =   100
            Top             =   1320
            Width           =   1815
         End
         Begin VB.Label lblVoiceVolume 
            Alignment       =   2  'Center
            Caption         =   "Voice Volume"
            Height          =   255
            Left            =   840
            TabIndex        =   104
            Top             =   2640
            Width           =   1815
         End
         Begin VB.Label lblVoiceSpeed 
            Alignment       =   2  'Center
            Caption         =   "Voice Speed, in WPM"
            Height          =   255
            Left            =   840
            TabIndex        =   102
            Top             =   1965
            Width           =   1815
         End
      End
      Begin VB.Frame framePopupSub 
         Caption         =   "Popup Subliminals (cycle time of 0 disables)"
         Height          =   4335
         Left            =   -74640
         TabIndex        =   149
         ToolTipText     =   "Subliminals that rapidly pop up during the session"
         Top             =   360
         Width           =   3495
         Begin VB.CommandButton cmdPopupFont 
            Caption         =   "Set Font"
            Height          =   375
            Left            =   1080
            TabIndex        =   244
            ToolTipText     =   "Set font of subliminal's text"
            Top             =   3000
            Width           =   1215
         End
         Begin VB.CommandButton cmdPopupBack 
            Caption         =   "Set Back Color"
            Height          =   375
            Left            =   1680
            TabIndex        =   157
            ToolTipText     =   "Set color of subliminal's background"
            Top             =   2640
            Width           =   1215
         End
         Begin VB.CommandButton cmdPopupText 
            Caption         =   "Set Text Color"
            Height          =   375
            Left            =   480
            TabIndex        =   156
            ToolTipText     =   "Set color of subliminal's text"
            Top             =   2640
            Width           =   1215
         End
         Begin MSComctlLib.Slider sliderCycleTime 
            Height          =   495
            Left            =   120
            TabIndex        =   151
            ToolTipText     =   "Determines how fast the program should process the subliminals (cycle speed)"
            Top             =   600
            Width           =   3255
            _ExtentX        =   5741
            _ExtentY        =   873
            _Version        =   393216
            Max             =   2000
            SelStart        =   1
            TickFrequency   =   100
            Value           =   1
         End
         Begin MSComctlLib.Slider sliderCyclesPerMessage 
            Height          =   495
            Left            =   120
            TabIndex        =   153
            ToolTipText     =   "Determines how random the messages should be displayed - 1 would be every cycle, 2 would be every other, etc"
            Top             =   1320
            Width           =   3255
            _ExtentX        =   5741
            _ExtentY        =   873
            _Version        =   393216
            Min             =   1
            Max             =   100
            SelStart        =   100
            TickFrequency   =   5
            Value           =   100
         End
         Begin MSComctlLib.Slider sliderDuration 
            Height          =   495
            Left            =   120
            TabIndex        =   155
            ToolTipText     =   "Specifies the amount of time in milliseconds that the subliminal message should be visible"
            Top             =   2040
            Width           =   3255
            _ExtentX        =   5741
            _ExtentY        =   873
            _Version        =   393216
            Min             =   1
            Max             =   500
            SelStart        =   10
            TickFrequency   =   10
            Value           =   10
         End
         Begin VB.Label lblDuration 
            Alignment       =   2  'Center
            Caption         =   "Message Duration"
            Height          =   255
            Left            =   120
            TabIndex        =   154
            ToolTipText     =   "Determines how random the messages should be displayed - 1 would be every cycle, 2 would be every other, etc"
            Top             =   1800
            Width           =   3255
         End
         Begin VB.Label lblCycles 
            Alignment       =   2  'Center
            Caption         =   "Cycles Per Message"
            Height          =   255
            Left            =   120
            TabIndex        =   152
            ToolTipText     =   "Determines how random the messages should be displayed - 1 would be every cycle, 2 would be every other, etc"
            Top             =   1080
            Width           =   3255
         End
         Begin VB.Label lblCycleTime 
            Alignment       =   2  'Center
            Caption         =   "Cycle Time (milliseconds)"
            Height          =   255
            Left            =   120
            TabIndex        =   150
            ToolTipText     =   "Determines how fast the program should process the subliminals (cycle speed)"
            Top             =   360
            Width           =   3255
         End
         Begin VB.Label lblPopupSample 
            Alignment       =   2  'Center
            AutoSize        =   -1  'True
            BackColor       =   &H00000000&
            Caption         =   "Subliminals"
            BeginProperty Font 
               Name            =   "MS Sans Serif"
               Size            =   15
               Charset         =   0
               Weight          =   700
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            ForeColor       =   &H00404040&
            Height          =   375
            Left            =   840
            TabIndex        =   158
            ToolTipText     =   "Example subliminal message"
            Top             =   3600
            Width           =   1695
         End
      End
      Begin VB.Frame frameFlasherSub 
         Caption         =   "Phrase Flashers (uncheck all to disable)"
         Height          =   5535
         Left            =   -71040
         TabIndex        =   159
         ToolTipText     =   "Subliminals that are located at the top and bottom of the induction window"
         Top             =   360
         Width           =   3855
         Begin VB.CommandButton Command1 
            Caption         =   "Set Font"
            Height          =   255
            Left            =   1320
            TabIndex        =   245
            ToolTipText     =   "Set the font of subliminal's text"
            Top             =   4560
            Width           =   1215
         End
         Begin VB.CommandButton cmdFlasherBack 
            Caption         =   "Set Back Color"
            Height          =   255
            Left            =   1920
            TabIndex        =   181
            ToolTipText     =   "Set color of subliminal's background"
            Top             =   4320
            Width           =   1215
         End
         Begin VB.TextBox txtFlash1 
            Alignment       =   2  'Center
            Height          =   285
            Left            =   480
            TabIndex        =   163
            Text            =   "Relaxed? Sink deep into hypnosis"
            ToolTipText     =   "Enter a subliminal message"
            Top             =   720
            Width           =   3255
         End
         Begin VB.TextBox txtFlash2 
            Alignment       =   2  'Center
            Height          =   285
            Left            =   480
            TabIndex        =   165
            Text            =   "Worried? Feel comfortable"
            ToolTipText     =   "Enter a subliminal message"
            Top             =   1080
            Width           =   3255
         End
         Begin VB.TextBox txtFlash3 
            Alignment       =   2  'Center
            Height          =   285
            Left            =   480
            TabIndex        =   167
            Text            =   "Unfocused? Listen, obey and focus"
            ToolTipText     =   "Enter a subliminal message"
            Top             =   1440
            Width           =   3255
         End
         Begin VB.TextBox txtFlash4 
            Alignment       =   2  'Center
            Height          =   285
            Left            =   480
            TabIndex        =   169
            Text            =   "Nervous? Feel calm and relaxed"
            ToolTipText     =   "Enter a subliminal message"
            Top             =   1800
            Width           =   3255
         End
         Begin VB.CheckBox chkFlash1 
            Height          =   255
            Left            =   120
            TabIndex        =   162
            ToolTipText     =   "Check to use this subliminal message"
            Top             =   720
            Value           =   1  'Checked
            Width           =   255
         End
         Begin VB.CheckBox chkFlash2 
            Height          =   255
            Left            =   120
            TabIndex        =   164
            ToolTipText     =   "Check to use this subliminal message"
            Top             =   1080
            Value           =   1  'Checked
            Width           =   255
         End
         Begin VB.CheckBox chkFlash3 
            Height          =   255
            Left            =   120
            TabIndex        =   166
            ToolTipText     =   "Check to use this subliminal message"
            Top             =   1440
            Value           =   1  'Checked
            Width           =   255
         End
         Begin VB.CheckBox chkFlash4 
            Height          =   255
            Left            =   120
            TabIndex        =   168
            ToolTipText     =   "Check to use this subliminal message"
            Top             =   1800
            Value           =   1  'Checked
            Width           =   255
         End
         Begin VB.TextBox txtFlash5 
            Alignment       =   2  'Center
            Height          =   285
            Left            =   480
            TabIndex        =   171
            ToolTipText     =   "Enter a subliminal message"
            Top             =   2160
            Width           =   3255
         End
         Begin VB.TextBox txtFlash6 
            Alignment       =   2  'Center
            Height          =   285
            Left            =   480
            TabIndex        =   173
            ToolTipText     =   "Enter a subliminal message"
            Top             =   2520
            Width           =   3255
         End
         Begin VB.TextBox txtFlash7 
            Alignment       =   2  'Center
            Height          =   285
            Left            =   480
            TabIndex        =   175
            ToolTipText     =   "Enter a subliminal message"
            Top             =   2880
            Width           =   3255
         End
         Begin VB.TextBox txtFlash8 
            Alignment       =   2  'Center
            Height          =   285
            Left            =   480
            TabIndex        =   177
            ToolTipText     =   "Enter a subliminal message"
            Top             =   3240
            Width           =   3255
         End
         Begin VB.CheckBox chkFlash5 
            Height          =   255
            Left            =   120
            TabIndex        =   170
            ToolTipText     =   "Check to use this subliminal message"
            Top             =   2160
            Width           =   255
         End
         Begin VB.CheckBox chkFlash6 
            Height          =   255
            Left            =   120
            TabIndex        =   172
            ToolTipText     =   "Check to use this subliminal message"
            Top             =   2520
            Width           =   255
         End
         Begin VB.CheckBox chkFlash7 
            Height          =   255
            Left            =   120
            TabIndex        =   174
            ToolTipText     =   "Check to use this subliminal message"
            Top             =   2880
            Width           =   255
         End
         Begin VB.CheckBox chkFlash8 
            Height          =   255
            Left            =   120
            TabIndex        =   176
            ToolTipText     =   "Check to use this subliminal message"
            Top             =   3240
            Width           =   255
         End
         Begin VB.CommandButton cmdFlasherText 
            Caption         =   "Set Text Color"
            Height          =   255
            Left            =   720
            TabIndex        =   180
            ToolTipText     =   "Set color of subliminal's text"
            Top             =   4320
            Width           =   1215
         End
         Begin MSComctlLib.Slider sliderMessageSpeed 
            Height          =   375
            Left            =   360
            TabIndex        =   179
            ToolTipText     =   "Determines the speed at which the messages change, in milliseconds"
            Top             =   3840
            Width           =   3255
            _ExtentX        =   5741
            _ExtentY        =   661
            _Version        =   393216
            Min             =   1
            Max             =   3000
            SelStart        =   300
            TickFrequency   =   100
            Value           =   300
         End
         Begin VB.Label lblPhrase 
            Alignment       =   2  'Center
            Caption         =   "Phrase to flash on screen"
            Height          =   255
            Left            =   600
            TabIndex        =   161
            Top             =   360
            Width           =   3015
         End
         Begin VB.Label lblUse 
            Caption         =   "Use?"
            Height          =   255
            Left            =   120
            TabIndex        =   160
            Top             =   360
            Width           =   375
         End
         Begin VB.Label lblMessageSpeed 
            Alignment       =   2  'Center
            Caption         =   "Message changing speed, in milliseconds"
            Height          =   255
            Left            =   480
            TabIndex        =   178
            Top             =   3600
            Width           =   3015
         End
         Begin VB.Label lblFlasherSample 
            Alignment       =   2  'Center
            AutoSize        =   -1  'True
            BackColor       =   &H00000000&
            Caption         =   "Subliminals"
            BeginProperty Font 
               Name            =   "MS Sans Serif"
               Size            =   12
               Charset         =   0
               Weight          =   700
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            ForeColor       =   &H00060606&
            Height          =   300
            Left            =   1240
            TabIndex        =   182
            ToolTipText     =   "Example subliminal message"
            Top             =   4920
            Width           =   1395
         End
      End
      Begin VB.Frame frameFlash 
         Caption         =   "Flash Animation Quality"
         Height          =   825
         Left            =   -69360
         TabIndex        =   144
         Top             =   5000
         Width           =   2415
         Begin VB.OptionButton optFlashLow 
            Caption         =   "Low"
            Height          =   255
            Left            =   135
            TabIndex        =   145
            ToolTipText     =   "Quality Level for Flash Animations"
            Top             =   225
            Width           =   660
         End
         Begin VB.OptionButton optFlashAutoLow 
            Caption         =   "AutoLow"
            Height          =   255
            Left            =   120
            TabIndex        =   146
            ToolTipText     =   "Quality Level for Flash Animations"
            Top             =   480
            Width           =   975
         End
         Begin VB.OptionButton optFlashHigh 
            Caption         =   "High"
            Height          =   255
            Left            =   1320
            TabIndex        =   147
            ToolTipText     =   "Quality Level for Flash Animations"
            Top             =   240
            Value           =   -1  'True
            Width           =   705
         End
         Begin VB.OptionButton optFlashAutoHigh 
            Caption         =   "Autohigh"
            Height          =   255
            Left            =   1320
            TabIndex        =   148
            ToolTipText     =   "Quality Level for Flash Animations"
            Top             =   480
            Width           =   975
         End
      End
      Begin VB.Frame frameSessionOptions 
         Caption         =   "Session Options"
         Height          =   2655
         Left            =   -74640
         TabIndex        =   45
         Top             =   2880
         Width           =   2295
         Begin VB.CheckBox chkShowConsole 
            Caption         =   "Show console during sessions"
            Height          =   375
            Left            =   240
            TabIndex        =   246
            ToolTipText     =   "Displays the script processor console while sessions are running."
            Top             =   2160
            Width           =   1935
         End
         Begin VB.CheckBox chkExitMessage 
            Caption         =   "Show top-left exit message"
            Height          =   375
            Left            =   240
            TabIndex        =   215
            ToolTipText     =   "Displays a message on the top-left of the session screen, saying how to exit"
            Top             =   1750
            Value           =   1  'Checked
            Width           =   1935
         End
         Begin VB.CheckBox chkScroll 
            Caption         =   "Scroll computer screen on popup"
            Height          =   375
            Left            =   240
            TabIndex        =   46
            ToolTipText     =   "Makes the computer screen seem to ""scroll up"" with Virtual Hypnotist underneath"
            Top             =   240
            Width           =   1815
         End
         Begin VB.CheckBox chkPerfMon 
            Caption         =   "Performance Monitor"
            Height          =   375
            Left            =   240
            TabIndex        =   47
            ToolTipText     =   "Enables the session performance monitor, which helps prevent freezes"
            Top             =   600
            Width           =   1815
         End
         Begin VB.CheckBox chkShowErrors 
            Caption         =   "Show script errors during session"
            Height          =   375
            Left            =   240
            TabIndex        =   48
            ToolTipText     =   "Shows comprehensive script error messages during sessions"
            Top             =   960
            Value           =   1  'Checked
            Width           =   1815
         End
         Begin VB.CheckBox chkDebug 
            Caption         =   "Show script commands (debug)"
            Height          =   375
            Left            =   240
            TabIndex        =   49
            ToolTipText     =   "Displays each script command in a popup dialog during the session"
            Top             =   1350
            Width           =   1815
         End
      End
      Begin VB.Frame frameSpeedSettings 
         Caption         =   "Speed Settings"
         Height          =   2775
         Left            =   -72720
         TabIndex        =   123
         Top             =   480
         Width           =   3255
         Begin VB.CommandButton cmdCustomDefault 
            Caption         =   "Default"
            Height          =   255
            Left            =   2160
            TabIndex        =   133
            ToolTipText     =   "Set custom audio rate to default (100%) speed value"
            Top             =   2280
            Width           =   975
         End
         Begin VB.CommandButton cmdVidDefault 
            Caption         =   "Default"
            Height          =   255
            Left            =   2160
            TabIndex        =   127
            ToolTipText     =   "Set video rate to default (100%) speed value"
            Top             =   600
            Width           =   975
         End
         Begin VB.CommandButton cmdVidAdd 
            Caption         =   "Add 1000"
            Height          =   255
            Left            =   2160
            TabIndex        =   126
            ToolTipText     =   "Click this to allow even higher speeds for some very trippy effects - limit is 30000% (30 times default speed)"
            Top             =   360
            Width           =   975
         End
         Begin VB.CommandButton cmdBackDefault 
            Caption         =   "Default"
            Height          =   255
            Left            =   2160
            TabIndex        =   130
            ToolTipText     =   "Set background audio rate to default (100%) speed value"
            Top             =   1440
            Width           =   975
         End
         Begin MSComctlLib.Slider VidSpeedSlider 
            Height          =   375
            Left            =   120
            TabIndex        =   125
            ToolTipText     =   "Set speed of video playback in percent"
            Top             =   480
            Width           =   2055
            _ExtentX        =   3625
            _ExtentY        =   661
            _Version        =   393216
            Min             =   51
            Max             =   1000
            SelStart        =   100
            TickFrequency   =   50
            Value           =   100
         End
         Begin MSComctlLib.Slider AudioSpeedSlider 
            Height          =   375
            Left            =   120
            TabIndex        =   129
            ToolTipText     =   "Set speed of background audio playback in percent"
            Top             =   1320
            Width           =   2055
            _ExtentX        =   3625
            _ExtentY        =   661
            _Version        =   393216
            Min             =   1
            Max             =   226
            SelStart        =   100
            TickFrequency   =   10
            Value           =   100
         End
         Begin MSComctlLib.Slider CustomSpeedSlider 
            Height          =   375
            Left            =   120
            TabIndex        =   132
            ToolTipText     =   "Set speed of custom audio playback in percent"
            Top             =   2160
            Width           =   2055
            _ExtentX        =   3625
            _ExtentY        =   661
            _Version        =   393216
            Min             =   1
            Max             =   226
            SelStart        =   100
            TickFrequency   =   10
            Value           =   100
         End
         Begin VB.Label lblCustomRate 
            Alignment       =   2  'Center
            Caption         =   "Custom Audio Playback Rate (%)"
            Height          =   255
            Left            =   120
            TabIndex        =   131
            ToolTipText     =   "Set speed of custom audio playback in percent"
            Top             =   1920
            Width           =   3015
         End
         Begin VB.Label lblAudioRate 
            Alignment       =   2  'Center
            Caption         =   "Background Audio Playback Rate (%)"
            Height          =   255
            Left            =   120
            TabIndex        =   128
            ToolTipText     =   "Set speed of background audio playback in percent"
            Top             =   1080
            Width           =   3015
         End
         Begin VB.Label lblVidRate 
            Alignment       =   2  'Center
            Caption         =   "Video/Animation Rate (%)"
            Height          =   255
            Left            =   120
            TabIndex        =   124
            ToolTipText     =   "Set speed of video playback in percent"
            Top             =   240
            Width           =   2055
         End
      End
      Begin VB.Frame frameCustomAudio 
         Caption         =   "Custom Audio"
         Height          =   2055
         Left            =   -69360
         TabIndex        =   134
         Top             =   480
         Width           =   2415
         Begin VB.TextBox txtCustomAudio 
            Height          =   615
            Left            =   120
            Locked          =   -1  'True
            MultiLine       =   -1  'True
            ScrollBars      =   1  'Horizontal
            TabIndex        =   136
            ToolTipText     =   "This box will contain the filename of the mp3 you have selected"
            Top             =   720
            Width           =   2175
         End
         Begin VB.CommandButton cmdChooseCustom 
            Caption         =   "Choose File"
            Height          =   375
            Left            =   480
            TabIndex        =   137
            ToolTipText     =   "Choose an mp3 audio file to play during the session"
            Top             =   1440
            Width           =   1455
         End
         Begin VB.Label lblCustomSelect 
            Alignment       =   2  'Center
            Caption         =   "Selected audio file:"
            Height          =   255
            Left            =   120
            TabIndex        =   135
            Top             =   360
            Width           =   2175
         End
      End
      Begin VB.Frame frameAudioVolume 
         Caption         =   "Audio Volume"
         Height          =   2745
         Left            =   -74880
         TabIndex        =   116
         Top             =   480
         Width           =   2055
         Begin VB.HScrollBar volVideo 
            Height          =   225
            LargeChange     =   100
            Left            =   120
            Max             =   0
            Min             =   -5000
            TabIndex        =   122
            Top             =   2160
            Value           =   -600
            Width           =   1815
         End
         Begin VB.HScrollBar volCustom 
            Height          =   225
            LargeChange     =   100
            Left            =   120
            Max             =   0
            Min             =   -5000
            TabIndex        =   120
            Top             =   1440
            Value           =   -600
            Width           =   1815
         End
         Begin VB.HScrollBar volBackground 
            Height          =   225
            LargeChange     =   100
            Left            =   120
            Max             =   0
            Min             =   -5000
            TabIndex        =   118
            Top             =   720
            Value           =   -600
            Width           =   1815
         End
         Begin VB.Label lblVidVol 
            Alignment       =   2  'Center
            BorderStyle     =   1  'Fixed Single
            Caption         =   "-600"
            Height          =   255
            Left            =   1320
            TabIndex        =   228
            Top             =   1830
            Width           =   615
         End
         Begin VB.Label lblCustVol 
            Alignment       =   2  'Center
            BorderStyle     =   1  'Fixed Single
            Caption         =   "-600"
            Height          =   255
            Left            =   1320
            TabIndex        =   227
            Top             =   1095
            Width           =   615
         End
         Begin VB.Label lblBackVol 
            Alignment       =   2  'Center
            BorderStyle     =   1  'Fixed Single
            Caption         =   "-600"
            Height          =   255
            Left            =   1320
            TabIndex        =   226
            Top             =   360
            Width           =   615
         End
         Begin VB.Label lblAudioVideo 
            Alignment       =   2  'Center
            Caption         =   "Video"
            Height          =   195
            Left            =   240
            TabIndex        =   121
            ToolTipText     =   "Change the video volume"
            Top             =   1845
            Width           =   1095
         End
         Begin VB.Label lblAudioCustom 
            Alignment       =   2  'Center
            Caption         =   "Custom"
            Height          =   195
            Left            =   240
            TabIndex        =   119
            ToolTipText     =   "Change the custom audio volume"
            Top             =   1125
            Width           =   1095
         End
         Begin VB.Label lblAudioBack 
            Alignment       =   2  'Center
            Caption         =   "Background"
            Height          =   195
            Left            =   240
            TabIndex        =   117
            ToolTipText     =   "Change the background audio volume"
            Top             =   375
            Width           =   1095
         End
      End
      Begin VB.Timer ResTimer 
         Enabled         =   0   'False
         Interval        =   5000
         Left            =   -73080
         Top             =   600
      End
      Begin VB.Frame frameSessionType 
         Caption         =   "Type of Session"
         Height          =   2295
         Left            =   -74640
         TabIndex        =   23
         Top             =   480
         Width           =   2295
         Begin VB.OptionButton optSessionStandard 
            Caption         =   "Standard"
            Height          =   375
            Left            =   120
            TabIndex        =   24
            ToolTipText     =   "Standard session"
            Top             =   240
            Value           =   -1  'True
            Width           =   1215
         End
         Begin VB.OptionButton optSessionPopup 
            Caption         =   "Pop Up"
            Height          =   375
            Left            =   120
            TabIndex        =   25
            ToolTipText     =   "Program hides and then pops up at specified time"
            Top             =   720
            Width           =   1215
         End
         Begin VB.OptionButton optSessionBackground 
            Caption         =   "Background (no visuals)"
            Height          =   375
            Left            =   120
            TabIndex        =   26
            ToolTipText     =   "Hides the program, but still runs the session (in the background)"
            Top             =   1200
            Width           =   2055
         End
         Begin VB.OptionButton optSessionSubliminal 
            Caption         =   "Background, subliminals only"
            Height          =   375
            Left            =   120
            TabIndex        =   27
            ToolTipText     =   "Display subliminals on the desktop"
            Top             =   1680
            Width           =   2055
         End
      End
      Begin VB.Frame frameSessionStart 
         Caption         =   "Session Start Time"
         Enabled         =   0   'False
         Height          =   2295
         Left            =   -72240
         TabIndex        =   28
         Top             =   480
         Width           =   2415
         Begin VB.OptionButton optStartInTime 
            Caption         =   "Start session in time above"
            Enabled         =   0   'False
            Height          =   375
            Left            =   120
            TabIndex        =   35
            ToolTipText     =   "Determine when the session should start after you click ""start session"" in the main screen"
            Top             =   1080
            Value           =   -1  'True
            Width           =   2175
         End
         Begin VB.OptionButton optStartAtRandom 
            Caption         =   "Start session at random time between now and time above"
            Enabled         =   0   'False
            Height          =   615
            Left            =   120
            TabIndex        =   36
            ToolTipText     =   "Determine when the session should start after you click ""start session"" in the main screen"
            Top             =   1560
            Width           =   2175
         End
         Begin MSComCtl2.UpDown UpDownHours 
            Height          =   375
            Left            =   720
            TabIndex        =   32
            Top             =   600
            Width           =   195
            _ExtentX        =   344
            _ExtentY        =   661
            _Version        =   393216
            BuddyControl    =   "lblSessionHours2"
            BuddyDispid     =   196788
            OrigLeft        =   840
            OrigTop         =   600
            OrigRight       =   1035
            OrigBottom      =   975
            Max             =   24
            SyncBuddy       =   -1  'True
            Wrap            =   -1  'True
            BuddyProperty   =   65537
            Enabled         =   0   'False
         End
         Begin MSComCtl2.UpDown UpDownMinutes 
            Height          =   375
            Left            =   1680
            TabIndex        =   34
            Top             =   600
            Width           =   195
            _ExtentX        =   344
            _ExtentY        =   661
            _Version        =   393216
            BuddyControl    =   "lblSessionMinutes2"
            BuddyDispid     =   196789
            OrigLeft        =   1680
            OrigTop         =   600
            OrigRight       =   1875
            OrigBottom      =   975
            Max             =   60
            SyncBuddy       =   -1  'True
            Wrap            =   -1  'True
            BuddyProperty   =   65537
            Enabled         =   0   'False
         End
         Begin VB.Label lblSessionHours 
            Alignment       =   2  'Center
            Caption         =   "Hours"
            Enabled         =   0   'False
            Height          =   255
            Left            =   360
            TabIndex        =   29
            Top             =   240
            Width           =   735
         End
         Begin VB.Label lblSessionHours2 
            BackColor       =   &H80000014&
            BorderStyle     =   1  'Fixed Single
            Caption         =   "0"
            Enabled         =   0   'False
            Height          =   375
            Left            =   360
            TabIndex        =   31
            Top             =   600
            Width           =   345
         End
         Begin VB.Label lblSessionMinutes2 
            BackColor       =   &H80000014&
            BorderStyle     =   1  'Fixed Single
            Caption         =   "0"
            Enabled         =   0   'False
            Height          =   375
            Left            =   1320
            TabIndex        =   33
            Top             =   600
            Width           =   345
         End
         Begin VB.Label lblSessionMinutes 
            Alignment       =   2  'Center
            Caption         =   "Minutes"
            Enabled         =   0   'False
            Height          =   255
            Left            =   1200
            TabIndex        =   30
            Top             =   240
            Width           =   735
         End
      End
      Begin VB.Frame frameScreenRes 
         Caption         =   "Screen Resolution"
         Height          =   2295
         Left            =   -69720
         TabIndex        =   37
         Top             =   480
         Width           =   2415
         Begin VB.CommandButton cmdResTest 
            Caption         =   "Test"
            Height          =   255
            Left            =   1560
            TabIndex        =   43
            ToolTipText     =   "Test resolution"
            Top             =   720
            Width           =   735
         End
         Begin VB.OptionButton optNoChange 
            Caption         =   "No change"
            Height          =   255
            Left            =   360
            TabIndex        =   38
            ToolTipText     =   "Keep resolution the way it is now"
            Top             =   240
            Value           =   -1  'True
            Width           =   1575
         End
         Begin VB.OptionButton opt1024 
            Caption         =   "1024x768"
            Height          =   255
            Left            =   360
            TabIndex        =   39
            ToolTipText     =   "Change screen resolution during session"
            Top             =   480
            Width           =   1575
         End
         Begin VB.OptionButton opt800 
            Caption         =   "800x600"
            Height          =   255
            Left            =   360
            TabIndex        =   40
            ToolTipText     =   "Change screen resolution during session"
            Top             =   720
            Width           =   1575
         End
         Begin VB.OptionButton opt640 
            Caption         =   "640x480"
            Height          =   255
            Left            =   360
            TabIndex        =   41
            ToolTipText     =   "Change screen resolution during session"
            Top             =   960
            Width           =   1575
         End
         Begin VB.OptionButton opt320 
            Caption         =   "320x240"
            Height          =   255
            Left            =   360
            TabIndex        =   42
            ToolTipText     =   "Change screen resolution during session"
            Top             =   1200
            Width           =   1575
         End
         Begin VB.Label optResNotice 
            Alignment       =   2  'Center
            Caption         =   "If the new screen resolution doesn't work, either press Enter or wait 5 seconds."
            Height          =   615
            Left            =   240
            TabIndex        =   44
            Top             =   1560
            Width           =   2055
         End
      End
      Begin VB.TextBox txtSessionComments 
         Height          =   1575
         Left            =   4560
         MaxLength       =   126
         MultiLine       =   -1  'True
         ScrollBars      =   2  'Vertical
         TabIndex        =   10
         ToolTipText     =   "Session comments"
         Top             =   1560
         Width           =   3255
      End
      Begin VB.TextBox txtSessionAuthor 
         Height          =   375
         Left            =   4560
         TabIndex        =   8
         ToolTipText     =   "Session authorship information"
         Top             =   1080
         Width           =   3255
      End
      Begin VB.TextBox txtSessionName 
         Height          =   375
         Left            =   4560
         TabIndex        =   6
         ToolTipText     =   "Name of session"
         Top             =   600
         Width           =   3255
      End
      Begin VB.Frame framePerfMon 
         Caption         =   "Performance Monitor"
         Height          =   1575
         Left            =   4440
         TabIndex        =   15
         ToolTipText     =   "Shows latency statistics of the previous session."
         Top             =   4080
         Width           =   3375
         Begin VB.Label lblLS 
            Caption         =   "Latency samples:"
            Height          =   255
            Left            =   240
            TabIndex        =   17
            ToolTipText     =   "Shows how many latency samples were taken"
            Top             =   600
            Width           =   1335
         End
         Begin VB.Label lblAL 
            Caption         =   "Average latency:"
            Height          =   255
            Left            =   240
            TabIndex        =   19
            ToolTipText     =   "Shows the average latency of the program in milliseconds"
            Top             =   840
            Width           =   1335
         End
         Begin VB.Label lblML 
            Caption         =   "Maximum latency:"
            Height          =   255
            Left            =   240
            TabIndex        =   21
            ToolTipText     =   "Shows the maximum latency of the previous session in milliseconds.  Highest allowed during session is 60."
            Top             =   1080
            Width           =   1335
         End
         Begin VB.Label lblLatencySamples 
            Alignment       =   2  'Center
            BorderStyle     =   1  'Fixed Single
            Height          =   255
            Left            =   1800
            TabIndex        =   18
            ToolTipText     =   "Shows how many latency samples were taken"
            Top             =   600
            Width           =   1095
         End
         Begin VB.Label lblAverageLatency 
            Alignment       =   2  'Center
            BorderStyle     =   1  'Fixed Single
            Caption         =   "no data"
            Height          =   255
            Left            =   1800
            TabIndex        =   20
            ToolTipText     =   "Shows the average latency of the program in milliseconds"
            Top             =   840
            Width           =   1095
         End
         Begin VB.Label lblMaxLatency 
            Alignment       =   2  'Center
            BorderStyle     =   1  'Fixed Single
            Caption         =   "no data"
            Height          =   255
            Left            =   1800
            TabIndex        =   22
            ToolTipText     =   "Shows the maximum latency of the previous session in milliseconds.  Highest allowed during session is 60."
            Top             =   1080
            Width           =   1095
         End
         Begin VB.Label lblStats 
            Alignment       =   2  'Center
            Caption         =   "Performance stats of previous session"
            Height          =   255
            Left            =   240
            TabIndex        =   16
            ToolTipText     =   "Shows latency statistics of the previous session."
            Top             =   240
            Width           =   2775
         End
      End
      Begin VB.Frame frameGraphics 
         Caption         =   "Graphics"
         Height          =   2475
         Left            =   -74880
         TabIndex        =   138
         Top             =   3360
         Width           =   5415
         Begin VB.CommandButton cmdCharAnims 
            Caption         =   "View Character Animations"
            Height          =   375
            Left            =   3000
            TabIndex        =   248
            Top             =   1800
            Width           =   2175
         End
         Begin VB.HScrollBar SliderVideoZoom 
            Height          =   225
            LargeChange     =   10
            Left            =   2880
            Max             =   200
            Min             =   1
            TabIndex        =   238
            Top             =   1320
            Value           =   90
            Width           =   1815
         End
         Begin VB.HScrollBar SliderCustomZoom 
            Height          =   225
            LargeChange     =   10
            Left            =   2880
            Max             =   200
            Min             =   1
            TabIndex        =   237
            Top             =   600
            Value           =   90
            Width           =   1815
         End
         Begin VB.HScrollBar SliderCharZoom 
            Height          =   225
            LargeChange     =   10
            Left            =   240
            Max             =   1000
            Min             =   10
            TabIndex        =   236
            Top             =   2040
            Value           =   100
            Width           =   1815
         End
         Begin VB.HScrollBar SliderCharVert 
            Height          =   225
            LargeChange     =   10
            Left            =   240
            Max             =   200
            Min             =   -100
            TabIndex        =   235
            Top             =   1320
            Value           =   50
            Width           =   1815
         End
         Begin VB.HScrollBar SliderCharHoriz 
            Height          =   225
            LargeChange     =   10
            Left            =   240
            Max             =   200
            Min             =   -100
            TabIndex        =   234
            Top             =   600
            Value           =   50
            Width           =   1815
         End
         Begin VB.Label lblVidZoom2 
            Alignment       =   2  'Center
            BorderStyle     =   1  'Fixed Single
            Caption         =   "90"
            Height          =   255
            Left            =   4720
            TabIndex        =   243
            ToolTipText     =   "Change size of the video"
            Top             =   1320
            Width           =   615
         End
         Begin VB.Label lblCharHoriz2 
            Alignment       =   2  'Center
            BorderStyle     =   1  'Fixed Single
            Caption         =   "50"
            Height          =   255
            Left            =   2090
            TabIndex        =   241
            ToolTipText     =   "Horizontal offset of animated character"
            Top             =   600
            Width           =   615
         End
         Begin VB.Label lblCharVert2 
            Alignment       =   2  'Center
            BorderStyle     =   1  'Fixed Single
            Caption         =   "50"
            Height          =   255
            Left            =   2090
            TabIndex        =   240
            ToolTipText     =   "Vertical offset of animated character"
            Top             =   1320
            Width           =   615
         End
         Begin VB.Label lblCharZoom2 
            Alignment       =   2  'Center
            BorderStyle     =   1  'Fixed Single
            Caption         =   "100"
            Height          =   255
            Left            =   2090
            TabIndex        =   239
            ToolTipText     =   "Enlarge/shrink the animated character"
            Top             =   2040
            Width           =   615
         End
         Begin VB.Label lblCustomZoom 
            Alignment       =   2  'Center
            Caption         =   "Custom Visual Zoom %"
            Height          =   210
            Left            =   2880
            TabIndex        =   140
            ToolTipText     =   "Change size of the custom visuals"
            Top             =   240
            Width           =   2400
         End
         Begin VB.Label lblCharZoom 
            Alignment       =   2  'Center
            Caption         =   "Character Zoom %"
            Height          =   210
            Left            =   240
            TabIndex        =   143
            ToolTipText     =   "Enlarge/shrink the animated character"
            Top             =   1680
            Width           =   2400
         End
         Begin VB.Label lblVidZoom 
            Alignment       =   2  'Center
            Caption         =   "Video Zoom (% of screen)"
            Height          =   255
            Left            =   2880
            TabIndex        =   142
            ToolTipText     =   "Change size of the video"
            Top             =   960
            Width           =   2400
         End
         Begin VB.Label lblCharHoriz 
            Alignment       =   2  'Center
            Caption         =   "Character Horizontal Position"
            Height          =   225
            Left            =   240
            TabIndex        =   139
            ToolTipText     =   "Horizontal offset of animated character"
            Top             =   240
            Width           =   2400
         End
         Begin VB.Label lblCharVert 
            Alignment       =   2  'Center
            Caption         =   "Character Vertical Position"
            Height          =   225
            Left            =   240
            TabIndex        =   141
            ToolTipText     =   "Vertical offset of animated character"
            Top             =   960
            Width           =   2400
         End
         Begin VB.Label lblCustomZoom2 
            Alignment       =   2  'Center
            BorderStyle     =   1  'Fixed Single
            Caption         =   "90"
            Height          =   255
            Left            =   4720
            TabIndex        =   242
            ToolTipText     =   "Change size of the custom visuals"
            Top             =   600
            Width           =   615
         End
      End
      Begin VB.Label Label1 
         Alignment       =   2  'Center
         Caption         =   "Other session components accessible from the main screen"
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   9.75
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   495
         Left            =   -72960
         TabIndex        =   185
         Top             =   840
         Width           =   4215
      End
      Begin VB.Label lblConfig 
         Alignment       =   2  'Center
         Caption         =   "Hypnosis Session Configuration"
         BeginProperty Font 
            Name            =   "Trebuchet MS"
            Size            =   15.75
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   1215
         Left            =   720
         TabIndex        =   214
         Top             =   600
         Width           =   2295
      End
      Begin VB.Image imgLogo 
         BorderStyle     =   1  'Fixed Single
         Height          =   2895
         Left            =   360
         Stretch         =   -1  'True
         Top             =   2040
         Width           =   3015
      End
      Begin VB.Label lblAudio 
         Alignment       =   2  'Center
         Caption         =   "Audio"
         Height          =   255
         Left            =   -74640
         TabIndex        =   86
         Top             =   4200
         Width           =   1935
      End
      Begin VB.Label lblCharacter 
         Alignment       =   2  'Center
         Caption         =   "Character"
         Height          =   255
         Left            =   -70800
         TabIndex        =   90
         Top             =   4200
         Width           =   1935
      End
      Begin VB.Label lblVideo 
         Alignment       =   2  'Center
         Caption         =   "Video"
         Height          =   255
         Left            =   -72720
         TabIndex        =   88
         Top             =   4200
         Width           =   1935
      End
      Begin VB.Label lblWakener 
         Alignment       =   2  'Center
         Caption         =   "Wakener"
         Height          =   255
         Left            =   -68880
         TabIndex        =   84
         Top             =   2400
         Width           =   1935
      End
      Begin VB.Label lblSuggestions 
         Alignment       =   2  'Center
         Caption         =   "Suggestions"
         Height          =   255
         Left            =   -70800
         TabIndex        =   82
         Top             =   2400
         Width           =   1935
      End
      Begin VB.Label lblDeepener 
         Alignment       =   2  'Center
         Caption         =   "Deepener"
         Height          =   255
         Left            =   -72720
         TabIndex        =   80
         Top             =   2400
         Width           =   1935
      End
      Begin VB.Label lblInduction 
         Alignment       =   2  'Center
         Caption         =   "Induction"
         Height          =   255
         Left            =   -74640
         TabIndex        =   78
         Top             =   2400
         Width           =   1935
      End
      Begin VB.Label lblSubliminals 
         Alignment       =   2  'Center
         Caption         =   "Subliminals"
         Height          =   255
         Left            =   -68880
         TabIndex        =   92
         Top             =   4200
         Width           =   1935
      End
      Begin VB.Label lblTextSpeak 
         Caption         =   "Text to Speak:"
         Height          =   255
         Left            =   -71040
         TabIndex        =   112
         Top             =   4080
         Width           =   1095
      End
      Begin VB.Label lblComments 
         Alignment       =   1  'Right Justify
         Caption         =   "Comments:"
         Height          =   255
         Left            =   3600
         TabIndex        =   9
         Top             =   1560
         Width           =   855
      End
      Begin VB.Label lblAuthor 
         Alignment       =   1  'Right Justify
         Caption         =   "Author:"
         Height          =   255
         Left            =   3840
         TabIndex        =   7
         Top             =   1080
         Width           =   615
      End
      Begin VB.Label lblDate 
         Alignment       =   1  'Right Justify
         Caption         =   "Date:"
         Height          =   255
         Left            =   3960
         TabIndex        =   11
         Top             =   3240
         Width           =   495
      End
      Begin VB.Label lblSessionName 
         Alignment       =   1  'Right Justify
         Caption         =   "Session Name:"
         Height          =   255
         Left            =   3360
         TabIndex        =   5
         Top             =   600
         Width           =   1095
      End
      Begin VB.Label lblFileFormat 
         Alignment       =   1  'Right Justify
         Caption         =   "File Format:"
         Height          =   255
         Left            =   3600
         TabIndex        =   13
         Top             =   3600
         Width           =   855
      End
      Begin VB.Label lblSessionFormat 
         Alignment       =   2  'Center
         BorderStyle     =   1  'Fixed Single
         Height          =   255
         Left            =   4560
         TabIndex        =   14
         ToolTipText     =   "Version of Virtual Hypnotist used to make the session"
         Top             =   3600
         Width           =   3255
      End
      Begin VB.Label lblSessionDate 
         Alignment       =   2  'Center
         BorderStyle     =   1  'Fixed Single
         Height          =   255
         Left            =   4560
         TabIndex        =   12
         ToolTipText     =   "Date session file saved"
         Top             =   3240
         Width           =   3255
      End
   End
   Begin MSComDlg.CommonDialog CommonDialog1 
      Left            =   0
      Top             =   0
      _ExtentX        =   847
      _ExtentY        =   847
      _Version        =   393216
   End
End
Attribute VB_Name = "frmSession"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'Virtual Hypnotist
'©2003-2008 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.

'Speech TTS list credits
'_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
'_/  Program:  TTSList.exe
'_/            frmTTS (TTSList.frm)
'_/  Authors:  Gordon Scott Bell (gsbell@bellcraft.com)
'_/  Created:  05/15/2000
'_/  Updated:  01/08/2004
'_/  Purpose:  Enumerate installed TTS Engines
'_/  Modified by : FollowtheWatch55, from code by Abhishek http://msagentworld.tripod.com
'_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/

Option Explicit

' ******************
' PROJECT REFERENCES
' ******************
' Microsoft Direct Speech Synthesis (XVOICE.DLL)
'   (installed with the SAPI 4.0 SDK SPCHAPI.EXE redistributable
'   or the Microsoft Speech Control Panel)
'Dim Char As IAgentCtlCharacterEx
'Const DATAPATH = "Char.acs"

Private Token As ISpeechObjectToken
Public SkipChar As Boolean
Private TTSFocus As Boolean

Private Sub balBackground_Change()
lblBackBal.Caption = LTrim$(Str$(balBackground.Value))
End Sub

Private Sub balCustom_Change()
lblCustBal.Caption = LTrim$(Str$(balCustom.Value))
End Sub

Private Sub balVideo_Change()
lblVidBal.Caption = LTrim$(Str$(balVideo.Value))
End Sub

Private Sub CheckTimer1_Timer()
If frameScreenSize.Enabled = False Then Exit Sub

If optFullScreen.Value = True Then
    lblScreenHorizSize.Enabled = False
    lblScreenVertSize.Enabled = False
    txtHorizSize.Enabled = False
    txtVertSize.Enabled = False
Else
    lblScreenHorizSize.Enabled = True
    lblScreenVertSize.Enabled = True
    txtHorizSize.Enabled = True
    txtVertSize.Enabled = True
End If

End Sub

Private Sub chkEnable3D_Click()
If chkEnable3D.Value = 1 Then
    chkEnableVideo.Value = 0
    chkEnableVisuals.Value = 0
    chkEnableChar.Value = 0
    chkEnableFlashers.Value = 0
    chkEnableSubliminals.Value = 0
End If
End Sub

Public Sub chkEnableAudio_Click()
If chkEnableAudio.Value = 1 Then fileAudio.Enabled = True
If chkEnableAudio.Value = 0 Then
    If InStr(AudioFile, "://") = 0 Then fileAudio.Enabled = False
End If
End Sub

Public Sub chkEnableBinaural_Click()
If Loading = False And getWindowsVersion(0) = 2 And getWindowsVersion(1) <= 4 Then
    MsgBox "The Brainwave Synchronizer will not work on Windows NT 4", vbOKOnly + vbCritical, "Virtual Hypnotist"
    Loading = True
    chkEnableBinaural.Value = 0
    Loading = False
    Exit Sub
End If
End Sub

Private Sub chkEnableChar_Click()
On Error Resume Next 'fixes an issue with Win98
If chkEnableChar.Value = 1 Then
    chkTextOnly.Value = 0
    Call fileCharacter_Click
End If
If chkEnableChar.Value = 0 And SynthSpeech = True And UseSAPI5 = False Then Char.Hide
End Sub

Public Sub chkEnableCustom_Click()
If chkEnableCustom.Value = 1 Then
    chkEnableInduction.Value = 0
    chkEnableDeepener.Value = 0
    chkEnableSuggestions.Value = 0
    chkEnableWakener.Value = 0
End If
End Sub

Public Sub chkEnableDeepener_Click()
If chkEnableDeepener.Value = 0 Then fileDeepener.Enabled = False
If chkEnableDeepener.Value = 1 Then
    If InStr(DeepenerFile, "://") = 0 Then fileDeepener.Enabled = True
    chkEnableCustom.Value = 0
End If
End Sub

Public Sub chkEnableInduction_Click()
If chkEnableInduction.Value = 0 Then fileInduction.Enabled = False
If chkEnableInduction.Value = 1 Then
    If InStr(InductionFile, "://") = 0 Then fileInduction.Enabled = True
    chkEnableCustom.Value = 0
End If
End Sub

Public Sub chkEnableSubliminals_Click()
If chkEnableSubliminals.Value = 1 Then fileSubliminals.Enabled = True
If chkEnableSubliminals.Value = 0 Then
    If InStr(SubliminalsFile, "://") = 0 Then fileSubliminals.Enabled = False
End If
End Sub

Public Sub chkEnableSuggestions_Click()
If chkEnableSuggestions.Value = 0 Then fileSuggestions.Enabled = False
If chkEnableSuggestions.Value = 1 Then
    If InStr(SuggestionsFile, "://") = 0 Then fileSuggestions.Enabled = True
    chkEnableCustom.Value = 0
End If
End Sub

Public Sub chkEnableVideo_Click()
If chkEnableVideo.Value = 0 Then
    fileVideo.Enabled = False
    SliderVideoZoom.Enabled = False
End If
If chkEnableVideo.Value = 1 Then
    If InStr(VideoFile, "://") = 0 Then fileVideo.Enabled = True
    SliderVideoZoom.Enabled = True
    chkEnable3D.Value = 0
End If
End Sub

Public Sub chkEnableVisuals_Click()
If chkEnableVisuals.Value = 1 Then chkEnable3D.Value = 0
End Sub

Public Sub chkEnableWakener_Click()
If chkEnableWakener.Value = 0 Then fileWakener.Enabled = False
If chkEnableWakener.Value = 1 Then
    If InStr(WakenerFile, "://") = 0 Then fileWakener.Enabled = True
    chkEnableCustom.Value = 0
End If
End Sub

Public Sub chkMonotone_Click()
If chkMonotone.Value = 1 Then chkWhisper.Value = 0
End Sub

Private Sub chkTextOnly_Click()
If SynthSpeech = False Then
    chkTextOnly.Value = 1
    chkEnableChar.Value = 0
    Exit Sub
End If

If chkTextOnly.Value = 0 And chkEnableChar.Value = 1 Then Exit Sub

Static PrevVal As Integer
If Loading = False Then
    If chkTextOnly.Value = 1 And PrevVal = 0 Then chkTextOnly = 2
    If chkTextOnly.Value = 0 And (PrevVal = 2 Or PrevVal = 0) Then chkTextOnly.Value = 1
End If
PrevVal = chkTextOnly.Value
If chkTextOnly.Value > 0 Then chkEnableChar.Value = 0
End Sub

Public Sub chkWhisper_Click()
If chkWhisper.Value = 1 Then chkMonotone.Value = 0
End Sub

Private Sub cmdBackDefault_Click()
AudioSpeedSlider.Value = 100
End Sub

Private Sub cmdBrainwave_Click()
Binaural.Show
End Sub

Private Sub cmdCharAnims_Click()
frmCharAnim.Show
End Sub

Private Sub cmdChooseCustom_Click()
On Error GoTo 100
'CommonDialog1.InitDir = App.Path
CommonDialog1.CancelError = True
'CommonDialog1.DefaultExt = ".mp3"
CommonDialog1.Filter = "Audio Files (*.mp3;*.wav;*.wma;*.ogg;*.mp2;*.mp1)|*.mp3;*.wav;*.wma;*.ogg;*.mp2;*.mp1|"
CommonDialog1.DialogTitle = "Choose Audio File"
CommonDialog1.Action = 1
txtCustomAudio = CommonDialog1.Filename
100
Exit Sub
End Sub

Private Sub cmdChooseURL_Click()
ChooseURL.Show
End Sub

Private Sub cmdCustomDefault_Click()
CustomSpeedSlider.Value = 100
End Sub

Private Sub cmdFileEditor_Click()
FileEditor.Show
End Sub

Private Sub cmdFlasherBack_Click()
Dim I As Long
CommonDialog1.Color = lblFlasherSample.BackColor
CommonDialog1.flags = cdlCCFullOpen Or cdlCCRGBInit
CommonDialog1.ShowColor
I = CommonDialog1.Color
If I <> -1 Then lblFlasherSample.BackColor = I
End Sub

Private Sub cmdFlasherText_Click()
Dim I As Long
CommonDialog1.Color = lblFlasherSample.ForeColor
CommonDialog1.flags = cdlCCFullOpen Or cdlCCRGBInit
CommonDialog1.ShowColor
I = CommonDialog1.Color
If I <> -1 Then lblFlasherSample.ForeColor = I
End Sub

Private Sub cmdHelp_Click()
If ExceptionHandlers = True Then On Error GoTo ErrorHandler
Dim HelpFile As String

If SSTab1.Tab = 0 Then HelpFile = "sessioninfo.html"
If SSTab1.Tab = 1 Then HelpFile = "sessiongeneral.html"
If SSTab1.Tab = 2 Then HelpFile = "sessioncomponents.html"
If SSTab1.Tab = 3 Then HelpFile = "sessionspeech.html"
If SSTab1.Tab = 4 Then HelpFile = "sessiongraphics.html"
If SSTab1.Tab = 5 Then HelpFile = "sessionsubliminals.html"
If SSTab1.Tab = 6 Then HelpFile = "session3d.html"
If SSTab1.Tab = 7 Then HelpFile = "sessionother.html"

Shell "hh " + App.Path + "\vh.chm::/" + HelpFile, vbNormalFocus
Exit Sub

ErrorHandler:
err.Source = "Session Configuration - cmdHelp"
   Call ErrorReport("An error occurred while loading Windows HTML Help.", vbExclamation)
  
End Sub

Public Sub cmdLoadSession_Click()
'VH Session Loader

On Error GoTo 423
If AutoLoadSession = True Then AutoLoadSession = False: GoTo StartLoading
CommonDialog1.InitDir = App.Path + "\sessions"
CommonDialog1.CancelError = True
CommonDialog1.DefaultExt = ".hyp"
CommonDialog1.Filter = "Virtual Hypnotist Session (*.hyp)|*.hyp|"
CommonDialog1.DialogTitle = "Load Session"
CommonDialog1.Action = 1
On Error GoTo 425
StartLoading:
Dim FileExists As Boolean
Dim I As Integer
I = Len(Dir$(CommonDialog1.Filename))
If err Or I = 0 Then
    FileExists = False
    Else
        FileExists = True
End If

On Error GoTo 425
If FileExists = False Then Error 53

Dim Version As String
Dim TempString As String
Dim TempInt As Integer
Dim TempBool As Boolean
Dim TempSingle As Single
Dim TempLong As Long
Dim NumRecords As Integer

Loading = True

'reset checkboxes to test for audio incompatability below
chkEnableBinaural.Value = 0
chkEnableSubliminals.Value = 0
chkEnableInduction.Value = 0
chkEnableDeepener.Value = 0
chkEnableSuggestions.Value = 0
chkEnableWakener.Value = 0
chkEnableAudio.Value = 0

Open CommonDialog1.Filename For Random As #1

'Find record length of file (this is to upgrade 5.0 beta versions to 5.0 final)
On Error Resume Next
I = 0
Do Until EOF(1)
I = I + 1
Get #1, I, TempString
Loop
NumRecords = I

On Error GoTo 425

'VH 3.0+ session file format (3.0 was the first version with load/save capabilities)

Get #1, 1, Version
If NumRecords > 102 And NumRecords < 117 Then
    MsgBox "Older file format found (version 5.0 Beta). Saving will upgrade file to version " + LTrim$(Str$(App.Major)) + "." + LTrim$(Str$(App.Minor)) + " format", vbOKOnly + vbInformation, "Virtual Hypnotist"
    Version = 4.99
Else
    If Val(Version) < LoadVersionFormat Then MsgBox "Older file format found (version " + Version + "). Saving will upgrade file to version " + LTrim$(Str$(App.Major)) + "." + LTrim$(Str$(App.Minor)) + " format", vbOKOnly + vbInformation, "Virtual Hypnotist"
End If

Get #1, 2, TempString
'change any absolute filename paths to relative paths - this fixes a bug that affected all previous versions
TempInt = InStrRev(TempString, "\")
If TempInt > 0 Then TempString = Mid$(TempString, TempInt + 1)

Call SelectFile(TempString, 1)

Get #1, 3, TempString
'change any absolute filename paths to relative paths - this fixes a bug that affected all previous versions
TempInt = InStrRev(TempString, "\")
If TempInt > 0 Then TempString = Mid$(TempString, TempInt + 1)

Call SelectFile(TempString, 2)

Get #1, 4, TempString
'change any absolute filename paths to relative paths - this fixes a bug that affected all previous versions
TempInt = InStrRev(TempString, "\")
If TempInt > 0 Then TempString = Mid$(TempString, TempInt + 1)

Call SelectFile(TempString, 3)

Get #1, 5, TempString
'change any absolute filename paths to relative paths - this fixes a bug that affected all previous versions
TempInt = InStrRev(TempString, "\")
If TempInt > 0 Then TempString = Mid$(TempString, TempInt + 1)

Call SelectFile(TempString, 4)

Get #1, 6, TempString
'change any absolute filename paths to relative paths - this fixes a bug that affected all previous versions
TempInt = InStrRev(TempString, "\")
If TempInt > 0 Then TempString = Mid$(TempString, TempInt + 1)

Call SelectFile(TempString, 6)

Get #1, 7, TempString
'change any absolute filename paths to relative paths - this fixes a bug that affected all previous versions
TempInt = InStrRev(TempString, "\")
If TempInt > 0 Then TempString = Mid$(TempString, TempInt + 1)

Call SelectFile(TempString, 7)

Get #1, 8, TempString
'change any absolute filename paths to relative paths - this fixes a bug that affected all previous versions
TempInt = InStrRev(TempString, "\")
If TempInt > 0 Then TempString = Mid$(TempString, TempInt + 1)

Call SelectFile(TempString, 8)

Get #1, 9, TempString
'change any absolute filename paths to relative paths - this fixes a bug that affected all previous versions
TempInt = InStrRev(TempString, "\")
If TempInt > 0 Then TempString = Mid$(TempString, TempInt + 1)

Call SelectFile(TempString, 5)

Get #1, 10, EngineName
Get #1, 11, TempString
If SynthSpeech = True And UseSAPI5 = False Then Char.TTSModeID = TempString
Get #1, 12, TempInt
'update value to 5.2 format
If NumRecords < 357 Then TempInt = ((ScreenX / Screen.TwipsPerPixelX / 2 + TempInt) / (ScreenX / Screen.TwipsPerPixelX)) * 100
SliderCharHoriz.Value = TempInt

Get #1, 13, TempInt
'update value to 5.2 format
If NumRecords < 357 Then TempInt = ((ScreenY / Screen.TwipsPerPixelY / 2 + TempInt) / (ScreenY / Screen.TwipsPerPixelY)) * 100
SliderCharVert.Value = TempInt

Get #1, 14, TempInt
chkEnableSubliminals.Value = TempInt
Get #1, 15, TempInt
chkMonotone.Value = TempInt
Get #1, 16, TempInt
chkWhisper.Value = TempInt
Get #1, 17, TempInt
chkEnableVideo.Value = TempInt
Get #1, 18, TempInt
If UseSAPI5 = False Then chkEnableChar.Value = TempInt
Get #1, 19, TempInt
chkEnableInduction.Value = TempInt
'this code doesn't always apply for some reason. look into this
'If (Check13.Value = 1 Or Check1.Value = 1) And getWindowsVersion(1) <= 4 And getWindowsVersion(2) <> 90 Then
'    MsgBox ("Windows 95, 98, and NT 4 cannot play multiple audio streams simultaneously." + vbCrLf + "Please choose either synthesized speech (an induction, deepener, etc), an audio file, or brainwaves.")
'    Check9.Value = 0
'End If
Get #1, 20, TempInt
chkEnableDeepener.Value = TempInt
'this code doesn't always apply for some reason. look into this
'If (Check13.Value = 1 Or Check1.Value = 1) And getWindowsVersion(1) <= 4 And getWindowsVersion(2) <> 90 Then
'    MsgBox ("Windows 95, 98, and NT 4 cannot play multiple audio streams simultaneously." + vbCrLf + "Please choose either synthesized speech (an induction, deepener, etc), an audio file, or brainwaves.")
'    Check10.Value = 0
'End If
Get #1, 21, TempInt
chkEnableSuggestions.Value = TempInt
'this code doesn't always apply for some reason. look into this
'If (Check13.Value = 1 Or Check1.Value = 1) And getWindowsVersion(1) <= 4 And getWindowsVersion(2) <> 90 Then
'    MsgBox ("Windows 95, 98, and NT 4 cannot play multiple audio streams simultaneously." + vbCrLf + "Please choose either synthesized speech (an induction, deepener, etc), an audio file, or brainwaves.")
'    Check11.Value = 0
'End If
Get #1, 22, TempInt
chkEnableWakener.Value = TempInt
'this code doesn't always apply for some reason. look into this
'If (Check13.Value = 1 Or Check1.Value = 1) And getWindowsVersion(1) <= 4 And getWindowsVersion(2) <> 90 Then
'    MsgBox ("Windows 95, 98, and NT 4 cannot play multiple audio streams simultaneously." + vbCrLf + "Please choose either synthesized speech (an induction, deepener, etc), an audio file, or brainwaves.")
'    Check12.Value = 12
'End If
Get #1, 23, TempInt
chkEnableAudio.Value = TempInt
'this code doesn't always apply for some reason. look into this
'If ((Check9.Value = 1 Or Check10.Value = 1 Or Check11.Value = 1 Or Check12.Value = 1) Or Check1.Value = 1) And getWindowsVersion(1) <= 4 And getWindowsVersion(2) <> 90 Then
'    MsgBox ("Windows 95, 98, and NT 4 cannot play multiple audio streams simultaneously." + vbCrLf + "Please choose either synthesized speech (an induction, deepener, etc), an audio file, or brainwaves.")
'    Check13.Value = 0
'End If
Get #1, 24, TempInt
sliderVoicePitch.Value = TempInt

Dim VoiceSpeedVal As Integer
Get #1, 25, VoiceSpeedVal
'Stored value is for SAPI4
If UseSAPI5 = False And NumRecords < 117 Then sliderVoiceSpeed.Value = VoiceSpeedVal

Dim VoiceVolumeVal As Long
Get #1, 26, VoiceVolumeVal
If UseSAPI5 = False And NumRecords < 117 Then sliderVoiceVolume.Value = VoiceVolumeVal

Get #1, 27, TempInt
SliderCharZoom.Value = TempInt
Get #1, 28, TempInt
SliderVideoZoom.Value = TempInt
Get #1, 29, TempInt
If TempInt = 1 Then optSessionStandard.Value = True
If TempInt = 2 Then optSessionPopup.Value = True
If TempInt = 3 Then optSessionBackground.Value = True
If TempInt = 4 Then optSessionSubliminal.Value = True
Get #1, 30, TempInt
If TempInt = 1 Then optStartInTime.Value = True
If TempInt = 2 Then optStartAtRandom.Value = True
Get #1, 31, TempInt
lblSessionHours2.Caption = Str$(TempInt)
UpDownHours.Value = TempInt
Get #1, 32, TempInt
lblSessionMinutes2.Caption = Str$(TempInt)
UpDownMinutes.Value = TempInt
Get #1, 33, TempInt
If TempInt = 1 Then optFlashLow.Value = True
If TempInt = 2 Then optFlashAutoLow.Value = True
If TempInt = 3 Then optFlashHigh.Value = True
If TempInt = 4 Then optFlashAutoHigh.Value = True

'Dont try to load 3.1+ specific options, if file is older
If Val(Version) < 3.1 Then GoTo UpgradeVersion

Get #1, 34, TempInt
sliderCycleTime.Value = TempInt
Get #1, 35, TempInt
sliderCyclesPerMessage.Value = TempInt
Get #1, 36, TempInt
'this value is not used anymore

'Dont try to load 3.2+ specific options, if file is older
If Val(Version) < 3.2 Then GoTo UpgradeVersion

If SynthSpeech = True Then
    Get #1, 37, TempString
    Call SelectFile(TempString, 9)
End If

'Dont try to load 4.0+ specific options, if file is older
If Val(Version) < 4 Then GoTo UpgradeVersion

Get #1, 38, TempInt
chkEnableBinaural.Value = TempInt
'this code doesn't always apply for some reason. look into this
'If ((Check9.Value = 1 Or Check10.Value = 1 Or Check11.Value = 1 Or Check12.Value = 1) Or Check13.Value = 1) And getWindowsVersion(1) <= 4 And getWindowsVersion(2) <> 90 Then
'    MsgBox ("Windows 95, 98, and NT 4 cannot play multiple audio streams simultaneously." + vbCrLf + "Please choose either synthesized speech (an induction, deepener, etc), an audio file, or brainwaves.")
'    Check1.Value = 0
'End If
Get #1, 39, TempInt
chkEnableFlashers.Value = TempInt
If getWindowsVersion(0) = 1 Or (getWindowsVersion(0) = 2 And getWindowsVersion(1) > 4) Then
    Get #1, 40, TempString
    Frequency1 = Val(TempString)
    Get #1, 41, TempString
    Frequency2 = Val(TempString)
    'fix for frequency value corruption in 5.1
    If Frequency1 = 0 Then
        MsgBox "Corrupted binaural frequencies found. Using defaults.", vbOKOnly + vbExclamation, "Virtual Hypnotist"
        Frequency1 = 159
        Frequency2 = 165
    End If
    Get #1, 42, TempInt
    SetVolume = TempInt
    Get #1, 43, TempInt
    PanVal = TempInt
    Get #1, 44, TempInt
    SetMVolume = TempInt
    Get #1, 45, TempString
    ShapeAColor1 = TempString
    Get #1, 46, TempString
    ShapeAColor2 = TempString
    Get #1, 47, TempString
    ShapeBColor1 = TempString
    Get #1, 48, TempString
    ShapeBColor2 = TempString
    Get #1, 49, TempInt
    BarWidth = TempInt
End If
Get #1, 50, TempInt
chkScroll.Value = TempInt
Get #1, 51, TempString
txtSessionName.Text = TempString
Get #1, 52, TempString
txtSessionAuthor.Text = TempString
Get #1, 53, TempString
txtSessionComments.Text = TempString
Get #1, 54, TempString
lblSessionDate.Caption = TempString

'Dont try to load 4.2+ specific options, if file is older
If Val(Version) < 4.2 Then GoTo UpgradeVersion

Get #1, 55, TempInt
SliderCustomZoom.Value = TempInt
Get #1, 56, TempInt
chkEnableVisuals.Value = TempInt
Get #1, 57, TempBool
Tunnel = TempBool
Get #1, 58, TempInt
VisualMaker.ScrollBar4.Value = TempInt
Get #1, 59, TempSingle
VisualMaker.ScrollBar5.Value = TempSingle * 100
Get #1, 60, TempInt
VisualMaker.ScrollBar6.Value = TempInt
Get #1, 61, TempInt
VisualMaker.Slider2.Value = TempInt
Get #1, 62, TempInt
cbf = TempInt
Get #1, 63, TempInt
SpiralThickness = TempInt
Get #1, 64, TempInt
VisualMaker.Slider1.Value = TempInt
Get #1, 65, TempInt
ScreenRes = TempInt
    If ScreenRes = 1 Then optNoChange.Value = True
    If ScreenRes = 2 Then opt1024.Value = True
    If ScreenRes = 3 Then opt800.Value = True
    If ScreenRes = 4 Then opt640.Value = True
    If ScreenRes = 5 Then opt320.Value = True
    
'Dont try to load 4.3+ specific options, if file is older
If Val(Version) < 4.3 Then GoTo UpgradeVersion
Get #1, 66, TempInt
VidSpeedSlider.Value = TempInt
Get #1, 67, TempInt
AudioSpeedSlider.Value = TempInt

'Dont try to load 4.41+ specific options, if file is older
If Val(Version) < 4.41 Then GoTo UpgradeVersion
Get #1, 68, TempString
txtFlash1.Text = TempString
Get #1, 69, TempString
txtFlash2.Text = TempString
Get #1, 70, TempString
txtFlash3.Text = TempString
Get #1, 71, TempString
txtFlash4.Text = TempString
Get #1, 72, TempString
txtFlash5.Text = TempString
Get #1, 73, TempString
txtFlash6.Text = TempString
Get #1, 74, TempString
txtFlash7.Text = TempString
Get #1, 75, TempString
txtFlash8.Text = TempString
Get #1, 76, TempInt
chkFlash1.Value = TempInt
Get #1, 77, TempInt
chkFlash2.Value = TempInt
Get #1, 78, TempInt
chkFlash3.Value = TempInt
Get #1, 79, TempInt
chkFlash4.Value = TempInt
Get #1, 80, TempInt
chkFlash5.Value = TempInt
Get #1, 81, TempInt
chkFlash6.Value = TempInt
Get #1, 82, TempInt
chkFlash7.Value = TempInt
Get #1, 83, TempInt
chkFlash8.Value = TempInt
Get #1, 84, TempInt
sliderMessageSpeed.Value = TempInt
Get #1, 85, TempString
lblPopupSample.ForeColor = TempString
Get #1, 86, TempString
lblPopupSample.BackColor = TempString
Get #1, 87, TempString
lblFlasherSample.ForeColor = TempString
Get #1, 88, TempString
lblFlasherSample.BackColor = TempString

'Dont try to load 4.5+ specific options, if file is older
If Val(Version) < 4.5 Then GoTo UpgradeVersion
Get #1, 89, TempInt
VisualMaker.Check4.Value = TempInt
Get #1, 90, TempInt
VisualMaker.Slider3.Value = TempInt
Get #1, 91, TempInt
VisualMaker.Slider4.Value = TempInt
Get #1, 92, TempInt
VisualMaker.Slider5.Value = TempInt
Get #1, 93, TempInt
VisualMaker.Slider7.Value = TempInt
Get #1, 94, TempString
VisualMaker.Label16.Caption = TempString
Get #1, 95, TempString
VisualMaker.Label1.Caption = TempString
Get #1, 96, TempBool
VisualMaker.Option3.Value = TempBool
Get #1, 97, TempBool
VisualMaker.Option4.Value = TempBool
Get #1, 98, TempBool
VisualMaker.Option5.Value = TempBool
Get #1, 99, TempInt
VisualMaker.Check1.Value = TempInt
Get #1, 100, TempInt
VisualMaker.Check2.Value = TempInt
Get #1, 101, TempInt
VisualMaker.Check3.Value = TempInt
Get #1, 102, SpiralColor

'Dont try to load 5.0+ specific options, if file is older
If Val(Version) < 5 Then GoTo UpgradeVersion
Get #1, 103, TempString
txtCustomAudio.Text = TempString
Get #1, 104, TempInt
volBackground.Value = TempInt
Get #1, 105, TempInt
volCustom.Value = TempInt
Get #1, 106, TempInt
volVideo.Value = TempInt
Get #1, 107, TempBool
optWindowed.Value = TempBool
If TempBool = False Then optFullScreen.Value = True
Get #1, 108, TempString
txtHorizSize.Text = TempString
Get #1, 109, TempString
txtVertSize.Text = TempString
Get #1, 110, TempInt
chkTextOnly.Value = TempInt
Get #1, 111, TempLong
lblTextOnlySample.ForeColor = TempLong
Get #1, 112, TempLong
lblTextOnlySample.BackColor = TempLong
Get #1, 113, TempString
lblTextOnlySample.FontName = TempString
'114 has been replaced by record 366
'Get #1, 114, TempInt
'lblTextOnlySample.FontSize = TempInt
Get #1, 115, TempBool
lblTextOnlySample.FontBold = TempBool
Get #1, 116, TempBool
lblTextOnlySample.FontItalic = TempBool
Get #1, 117, TempInt
sliderDuration.Value = TempInt
Get #1, 118, TempInt
'used to be for 3D Zoom slider; not used anymore
Get #1, 119, TempInt
If I = 1 Then optHypnoMachine.Value = True
If I = 2 Then optHypnoCoaster.Value = True
Get #1, 120, TempString
If TempString <> "" And UseSAPI5 = True Then
    For I = 0 To (FormatCB.ListCount - 1)
        If LCase$(FormatCB.List(I)) = LCase$(TempString) Then FormatCB.ListIndex = I
    Next I
End If
Get #1, 121, TempBool

'Skip 5.0 RC4-specific stuff, if older
If NumRecords < 122 Then
    Call VisualMaker.ResetVisuals(2)
    GoTo SkipStuff
End If

Get #1, 122, VisualMode
Dim j As Integer
I = 123
VisualMaker.List1.Clear
For j = 0 To 9
    Get #1, I, TempString
    VisualMaker.List1.AddItem TempString
    I = I + 1
Next j
VisualMaker.List1.ListIndex = 0
For j = 0 To 9
    Get #1, I, CShapeType(j)
    I = I + 1
Next j
For j = 0 To 9
    Get #1, I, CShapeDrawMode(j)
    I = I + 1
Next j
For j = 0 To 9
    Get #1, I, CShapeBackStyle(j)
    I = I + 1
Next j
For j = 0 To 9
    Get #1, I, CShapeBackColor(j)
    I = I + 1
Next j
For j = 0 To 9
    Get #1, I, CShapeFillStyle(j)
    I = I + 1
Next j
For j = 0 To 9
    Get #1, I, CShapeFillColor(j)
    I = I + 1
Next j
For j = 0 To 9
    Get #1, I, CShapeBorderStyle(j)
    I = I + 1
Next j
For j = 0 To 9
    Get #1, I, CShapeBorderColor(j)
    I = I + 1
Next j
For j = 0 To 9
    Get #1, I, CShapeBorderWidth(j)
    I = I + 1
Next j
For j = 0 To 9
    Get #1, I, CShapeVert(j)
    I = I + 1
Next j
For j = 0 To 9
    Get #1, I, CShapeHoriz(j)
    I = I + 1
Next j
For j = 0 To 9
    Get #1, I, CShapeHeight(j)
    I = I + 1
Next j
For j = 0 To 9
    Get #1, I, CShapeWidth(j)
    I = I + 1
Next j
For j = 0 To 9
    Get #1, I, CFlash(j)
    I = I + 1
Next j
For j = 0 To 9
    Get #1, I, CChangeShape(j)
    I = I + 1
Next j
For j = 0 To 9
    Get #1, I, CChangeColor(j)
    I = I + 1
Next j
For j = 0 To 9
    Get #1, I, CFlashDuration(j)
    I = I + 1
Next j
For j = 0 To 9
    Get #1, I, CShapeDuration(j)
    I = I + 1
Next j
For j = 0 To 9
    Get #1, I, CColorDuration(j)
    I = I + 1
Next j
For j = 0 To 9
    Get #1, I, CShape(j)
    I = I + 1
Next j
For j = 0 To 9
    Get #1, I, CShapeAltColor(j)
    I = I + 1
Next j
For j = 0 To 9
    Get #1, I, CColorType(j)
    I = I + 1
Next j

'Dont try to load 5.2+ specific options, if file is older
If Val(Version) < 5.2 Then GoTo UpgradeVersion
Get #1, 353, TempInt
sliderTextSpeed.Value = TempInt
Get #1, 354, TempInt
balBackground.Value = TempInt
Get #1, 355, TempInt
balCustom.Value = TempInt
Get #1, 356, TempInt
balVideo.Value = TempInt

If NumRecords < 357 Then
    sliderTextFadeSpeed.Value = 4
    GoTo SkipStuff
End If
Get #1, 357, TempInt
sliderTextFadeSpeed.Value = TempInt

'Dont try to load 5.3+ specific options, if file is older
If Val(Version) < 5.3 Then GoTo UpgradeVersion
Get #1, 358, TempString
lblPopupSample.FontName = TempString
Get #1, 359, TempSingle
lblPopupSample.FontSize = TempSingle
Get #1, 360, TempBool
lblPopupSample.FontBold = TempBool
Get #1, 361, TempBool
lblPopupSample.FontItalic = TempBool
Get #1, 362, TempString
lblFlasherSample.FontName = TempString
Get #1, 363, TempSingle
lblFlasherSample.FontSize = TempSingle
Get #1, 364, TempBool
lblFlasherSample.FontBold = TempBool
Get #1, 365, TempBool
lblFlasherSample.FontItalic = TempBool
Get #1, 366, TempSingle
lblTextOnlySample.FontSize = TempSingle

If NumRecords < 367 Then GoTo SkipStuff

Get #1, 367, GrockColor
Get #1, 368, GrockColor2
Get #1, 369, GrockColorMode
Get #1, 370, GrockFile
Get #1, 371, GrockShapeType
Get #1, 372, GrockNumShapes
Get #1, 373, GrockWidth
Get #1, 374, GrockOffset
Get #1, 375, GrockRadiusX
Get #1, 376, GrockRadiusY
Get #1, 377, GrockFade
Get #1, 378, GrockFontName
Get #1, 379, GrockFontSize
Get #1, 380, GrockFontBold
Get #1, 381, GrockFontItalic
Get #1, 382, GrockFontColor
Get #1, 383, GrockBackColor
Get #1, 384, GrockFrequency
Get #1, 385, GrockFrequency2
Get #1, 386, GrockDuration
Get #1, 387, GrockEnableTones

If NumRecords < 388 Then GoTo SkipStuff
Get #1, 388, CircleCycle
VisualMaker.ScrollBar7.Value = CircleCycle
Get #1, 389, CircleSpeedR
VisualMaker.ScrollBar8.Value = CircleSpeedR
Get #1, 390, CircleSpeedG
VisualMaker.ScrollBar9.Value = CircleSpeedG
Get #1, 391, CircleSpeedB
VisualMaker.ScrollBar10.Value = CircleSpeedB
Get #1, 392, TempInt
VisualMaker.Check7.Value = TempInt
Get #1, 393, RLower
Get #1, 394, GLower
Get #1, 395, BLower
Get #1, 396, RUpper
Get #1, 397, GUpper
Get #1, 398, BUpper

If NumRecords < 399 Then GoTo SkipStuff
Get #1, 399, TempInt
VisualMaker.volSlider.Value = TempInt

'Dont try to load 5.4+ specific options, if file is older
If Val(Version) < 5.4 Then GoTo UpgradeVersion
Get #1, 400, TempInt
Binaural.Slider1.Value = TempInt
Get #1, 401, TempInt
Binaural.chkAlternate.Value = TempInt
Get #1, 402, TempInt
Binaural.Slider3.Value = TempInt
Get #1, 403, TempInt
Binaural.ShapeType.Value = TempInt
Get #1, 404, TempInt
VisualMaker.Check8.Value = TempInt

'Dont try to load 5.41+ specific options, if file is older
If Val(Version) < 5.41 Then GoTo UpgradeVersion
Get #1, 405, TempInt
Binaural.chkFlasherRate.Value = TempInt
Get #1, 406, TempInt
Binaural.spinFlasherRate.Value = TempInt

'Dont try to load 5.61+ specific options, if file is older
If Val(Version) < 5.61 Then GoTo UpgradeVersion
Get #1, 407, GrockLoopText
Get #1, 408, GrockUseText

SkipStuff:

'upgrade values to SAPI5 if file was stored using SAPI4
If UseSAPI5 = True And TempBool = False Then
    VoiceVolumeVal = VoiceVolumeVal / 655
    sliderVoiceVolume.Min = 1
    sliderVoiceVolume.Max = 100
    sliderVoiceSpeed.Min = -10
    VoiceSpeedVal = VoiceSpeedVal - 100 'shift values over
    If VoiceSpeedVal < 0 Then VoiceSpeedVal = VoiceSpeedVal / 5
    If VoiceSpeedVal > 0 Then VoiceSpeedVal = VoiceSpeedVal / 15
    frmSession.sliderVoiceSpeed.Max = 10
End If

'downgrade values to SAPI4 if file was stored using SAPI5
If UseSAPI5 = False And TempBool = True Then
    sliderVoiceVolume.Min = 1
    sliderVoiceVolume.Max = 65535
    VoiceVolumeVal = VoiceVolumeVal * 655
    sliderVoiceSpeed.Max = 250
    VoiceSpeedVal = VoiceSpeedVal + 10 'shift values over
    VoiceSpeedVal = VoiceSpeedVal * 10
    sliderVoiceSpeed.Min = 50
End If

sliderVoiceVolume.Value = VoiceVolumeVal
sliderVoiceSpeed.Value = VoiceSpeedVal

UpgradeVersion:
Close #1

Call LoadDefaults(Val(Version), False)

'Quick initialization
lblSessionFormat.Caption = Version
Call chkEnableSubliminals_Click
Call chkMonotone_Click
Call chkWhisper_Click
Call chkEnableVideo_Click
Call chkEnableInduction_Click
Call chkEnableDeepener_Click
Call chkEnableSuggestions_Click
Call chkEnableWakener_Click
Call chkEnableAudio_Click
Loading = False
Call fileCharacter_Click
Exit Sub
423 Exit Sub
425 Call ErrorReport("An error occurred while loading the file.", vbExclamation)
    Close #1
Exit Sub
End Sub

Private Sub cmdMakePackage_Click()
frmPackage.Show
End Sub

Private Sub cmdOK_Click()
If IsNumeric(txtHorizSize.Text) = False Or IsNumeric(txtVertSize.Text) = False Then MsgBox "Screen size value(s) are not numeric", vbExclamation: Exit Sub
WriteINIString 1, "settings", "perfmon", LTrim$(Str$(chkPerfMon.Value))
WriteINIString 1, "settings", "scripterrors", LTrim$(Str$(chkShowErrors.Value))
WriteINIString 1, "settings", "scriptdebug", LTrim$(Str$(chkDebug.Value))
WriteINIString 1, "settings", "sapi5output", AudioOutputCB.List(AudioOutputCB.ListIndex)
WriteINIString 1, "settings", "exitmessage", LTrim$(Str$(chkExitMessage.Value))
WriteINIString 1, "settings", "showconsole", LTrim$(Str$(chkShowConsole.Value))
If UseSAPI5 = True Then WriteINIString 1, "settings", "sapi5pausetime", LTrim$(Str$(sliderPauseTime.Value))
If chkPerfMon.Value = 1 Then PerfMon = True Else PerfMon = False
If chkShowErrors.Value = 1 Then ScriptErrors = True Else ScriptErrors = False
If chkDebug.Value = 1 Then ScriptDebug = True Else ScriptDebug = False
If chkShowConsole.Value = 1 Then DisplayConsole = True Else DisplayConsole = False
Me.Hide
End Sub

Private Sub cmdPopupBack_Click()
Dim I As Long
CommonDialog1.Color = lblPopupSample.BackColor
CommonDialog1.flags = cdlCCFullOpen Or cdlCCRGBInit
CommonDialog1.ShowColor
I = CommonDialog1.Color
If I <> -1 Then lblPopupSample.BackColor = I
End Sub

Private Sub cmdPopupFont_Click()
' Set Cancel to True.
   CommonDialog1.CancelError = True
   On Error GoTo ErrHandler
   
   'put current settings into the dialog box
   CommonDialog1.FontName = lblPopupSample.FontName
   CommonDialog1.FontSize = lblPopupSample.FontSize
   CommonDialog1.FontBold = lblPopupSample.FontBold
   CommonDialog1.FontItalic = lblPopupSample.FontItalic

   ' Set the Flags property.
   CommonDialog1.flags = cdlCFBoth
   ' Display the Font dialog box.
   CommonDialog1.ShowFont
   ' Set text properties according to user's
   ' selections.
   
   lblPopupSample.FontName = CommonDialog1.FontName
   lblPopupSample.FontSize = CommonDialog1.FontSize
   lblPopupSample.FontBold = CommonDialog1.FontBold
   lblPopupSample.FontItalic = CommonDialog1.FontItalic

Exit Sub

ErrHandler:
   ' User pressed Cancel button.
   Exit Sub
End Sub

Private Sub cmdPopupText_Click()
Dim I As Long
CommonDialog1.Color = lblPopupSample.ForeColor
CommonDialog1.flags = cdlCCFullOpen Or cdlCCRGBInit
CommonDialog1.ShowColor
I = CommonDialog1.Color
If I <> -1 Then lblPopupSample.ForeColor = I
End Sub

Private Sub cmdPreset_Click()
frmPresets.Show
End Sub

Private Sub cmdResTest_Click()
If optNoChange.Value = True Then Exit Sub
frmMain.Hide
If ScreenRes = 2 Then Call ChangeRes(1024, 768)
If ScreenRes = 3 Then Call ChangeRes(800, 600)
If ScreenRes = 4 Then Call ChangeRes(640, 480)
If ScreenRes = 5 Then Call ChangeRes(320, 240)

ResTimer.Enabled = True
Dim result As Integer
result = MsgBox("Does this resolution work properly?", vbYesNo + vbDefaultButton2, "Virtual Hypnotist")
If result = 6 Then
    ResTimer.Enabled = False
    Call ChangeRes(0, 0)
    frmMain.Show
    Me.Show
    Exit Sub
End If
If result = 7 Then
    ResTimer.Enabled = False
    Call ChangeRes(0, 0)
    frmMain.Show
    Me.Show
    optNoChange.Value = True
End If
End Sub

Private Sub cmdSaveSession_Click()
On Error GoTo 323
CommonDialog1.InitDir = App.Path + "\sessions"
CommonDialog1.CancelError = True
CommonDialog1.DefaultExt = ".hyp"
CommonDialog1.Filter = "Virtual Hypnotist Session (*.hyp)|*.hyp|"
CommonDialog1.DialogTitle = "Save Session"
CommonDialog1.Action = 2
If ExceptionHandlers = True Then On Error GoTo 325
Dim FileExists As Boolean
Dim TempString As String

Dim I As Integer
I = Len(Dir$(CommonDialog1.Filename))
If err Or I = 0 Then
    FileExists = False
    Else
        FileExists = True
End If
If FileExists = True Then
    If MsgBox("Replace existing file?", vbYesNo + vbQuestion + vbDefaultButton2, "Virtual Hypnotist") = vbNo Then Exit Sub
End If

If ExceptionHandlers = True Then On Error GoTo 325
Open CommonDialog1.Filename For Random As #1
Dim Version As String
If SaveVersion = "" Then
    Version = LTrim$(Str$(App.Major)) + "." + LTrim$(Str$(App.Minor))
Else
    Version = SaveVersion
End If

Put #1, 1, Version
lblSessionFormat.Caption = LTrim$(Str$(Version))
If chkEnableInduction.Value = 1 Then
    Put #1, 2, InductionFile
Else
    Put #1, 2, ""
End If
If chkEnableDeepener.Value = 1 Then
    Put #1, 3, DeepenerFile
Else
    Put #1, 3, ""
End If
If chkEnableSuggestions.Value = 1 Then
    Put #1, 4, SuggestionsFile
Else
    Put #1, 4, ""
End If
If chkEnableWakener.Value = 1 Then
    Put #1, 5, WakenerFile
Else
    Put #1, 5, ""
End If
If chkEnableVideo.Value = 1 Then
    Put #1, 6, VideoFile
Else
    Put #1, 6, ""
End If
Put #1, 7, CharacterFile
If chkEnableSubliminals.Value = 1 Then
    Put #1, 8, SubliminalsFile
Else
    Put #1, 8, ""
End If
If chkEnableAudio.Value = 1 Then
    Put #1, 9, AudioFile
Else
    Put #1, 9, ""
End If
Put #1, 10, EngineName
If SynthSpeech = True And UseSAPI5 = False Then Put #1, 11, Char.TTSModeID
Put #1, 12, SliderCharHoriz.Value
Put #1, 13, SliderCharVert.Value
Put #1, 14, chkEnableSubliminals.Value
Put #1, 15, chkMonotone.Value
Put #1, 16, chkWhisper.Value
Put #1, 17, chkEnableVideo.Value
Put #1, 18, chkEnableChar.Value
Put #1, 19, chkEnableInduction.Value
Put #1, 20, chkEnableDeepener.Value
Put #1, 21, chkEnableSuggestions.Value
Put #1, 22, chkEnableWakener.Value
Put #1, 23, chkEnableAudio.Value
Put #1, 24, sliderVoicePitch.Value
Put #1, 25, sliderVoiceSpeed.Value
Put #1, 26, sliderVoiceVolume.Value
Put #1, 27, SliderCharZoom.Value
Put #1, 28, SliderVideoZoom.Value
If optSessionStandard.Value = True Then I = 1
If optSessionPopup.Value = True Then I = 2
If optSessionBackground.Value = True Then I = 3
If optSessionSubliminal.Value = True Then I = 4
Put #1, 29, I
If optStartInTime.Value = True Then I = 1
If optStartAtRandom.Value = True Then I = 2
Put #1, 30, I
Put #1, 31, UpDownHours.Value
Put #1, 32, UpDownMinutes.Value
If optFlashLow.Value = True Then I = 1
If optFlashAutoLow.Value = True Then I = 2
If optFlashHigh.Value = True Then I = 3
If optFlashAutoHigh.Value = True Then I = 4
Put #1, 33, I
Put #1, 34, sliderCycleTime.Value
Put #1, 35, sliderCyclesPerMessage.Value
Put #1, 36, 0 'used to be chkInvert.Value
Put #1, 37, txtTTS.List(txtTTS.ListIndex)
Put #1, 38, chkEnableBinaural.Value
Put #1, 39, chkEnableFlashers.Value
If getWindowsVersion(0) = 1 Or (getWindowsVersion(0) = 2 And getWindowsVersion(1) > 4) Then
    Put #1, 40, LTrim$(Str$(Frequency1))
    Put #1, 41, LTrim$(Str$(Frequency2))
    Put #1, 42, Int(SetVolume)
    Put #1, 43, Int(PanVal)
    Put #1, 44, Int(SetMVolume)
    Put #1, 45, ShapeAColor1
    Put #1, 46, ShapeAColor2
    Put #1, 47, ShapeBColor1
    Put #1, 48, ShapeBColor2
    Put #1, 49, BarWidth
End If
Put #1, 50, chkScroll.Value
Put #1, 51, txtSessionName.Text
Put #1, 52, txtSessionAuthor.Text
Put #1, 53, txtSessionComments.Text
Dim a As String
a = Date
lblSessionDate.Caption = a
Put #1, 54, a
Put #1, 55, SliderCustomZoom.Value
Put #1, 56, chkEnableVisuals.Value
Put #1, 57, Tunnel
Put #1, 58, CircleSize
Put #1, 59, CircleRadius
Put #1, 60, CircleWidth
Put #1, 61, VisualMaker.Slider2.Value
Put #1, 62, cbf
Put #1, 63, SpiralThickness
Put #1, 64, VisualMaker.Slider1.Value
Put #1, 65, ScreenRes
Put #1, 66, VidSpeedSlider.Value
Put #1, 67, AudioSpeedSlider.Value
Put #1, 68, txtFlash1.Text
Put #1, 69, txtFlash2.Text
Put #1, 70, txtFlash3.Text
Put #1, 71, txtFlash4.Text
Put #1, 72, txtFlash5.Text
Put #1, 73, txtFlash6.Text
Put #1, 74, txtFlash7.Text
Put #1, 75, txtFlash8.Text
Put #1, 76, chkFlash1.Value
Put #1, 77, chkFlash2.Value
Put #1, 78, chkFlash3.Value
Put #1, 79, chkFlash4.Value
Put #1, 80, chkFlash5.Value
Put #1, 81, chkFlash6.Value
Put #1, 82, chkFlash7.Value
Put #1, 83, chkFlash8.Value
Put #1, 84, sliderMessageSpeed.Value
a = lblPopupSample.ForeColor
Put #1, 85, a
a = lblPopupSample.BackColor
Put #1, 86, a
a = lblFlasherSample.ForeColor
Put #1, 87, a
a = lblFlasherSample.BackColor
Put #1, 88, a
Put #1, 89, VisualMaker.Check4.Value
Put #1, 90, VisualMaker.Slider3.Value
Put #1, 91, VisualMaker.Slider4.Value
Put #1, 92, VisualMaker.Slider5.Value
Put #1, 93, VisualMaker.Slider7.Value
Put #1, 94, VisualMaker.Label16.Caption
Put #1, 95, VisualMaker.Label1.Caption
Put #1, 96, VisualMaker.Option3.Value
Put #1, 97, VisualMaker.Option4.Value
Put #1, 98, VisualMaker.Option5.Value
Put #1, 99, VisualMaker.Check1.Value
Put #1, 100, VisualMaker.Check2.Value
Put #1, 101, VisualMaker.Check3.Value
Put #1, 102, SpiralColor
Put #1, 103, txtCustomAudio.Text
Put #1, 104, volBackground.Value
Put #1, 105, volCustom.Value
Put #1, 106, volVideo.Value
Put #1, 107, optWindowed.Value
Put #1, 108, txtHorizSize.Text
Put #1, 109, txtVertSize.Text
Put #1, 110, chkTextOnly.Value
Put #1, 111, lblTextOnlySample.ForeColor
Put #1, 112, lblTextOnlySample.BackColor
Put #1, 113, lblTextOnlySample.FontName
I = lblTextOnlySample.FontSize
Put #1, 114, I 'for backwards compatibility only
Put #1, 115, lblTextOnlySample.FontBold
Put #1, 116, lblTextOnlySample.FontItalic
Put #1, 117, sliderDuration.Value
Put #1, 118, 0 'not used
If optHypnoMachine.Value = True Then I = 1
If optHypnoCoaster.Value = True Then I = 2
Put #1, 119, I
Put #1, 120, FormatCB.List(FormatCB.ListIndex)
Put #1, 121, UseSAPI5
Put #1, 122, VisualMode
Dim j As Integer
I = 123
For j = 0 To 9
    Put #1, I, VisualMaker.List1.List(j)
    I = I + 1
Next j
For j = 0 To 9
    Put #1, I, CShapeType(j)
    I = I + 1
Next j
For j = 0 To 9
    Put #1, I, CShapeDrawMode(j)
    I = I + 1
Next j
For j = 0 To 9
    Put #1, I, CShapeBackStyle(j)
    I = I + 1
Next j
For j = 0 To 9
    Put #1, I, CShapeBackColor(j)
    I = I + 1
Next j
For j = 0 To 9
    Put #1, I, CShapeFillStyle(j)
    I = I + 1
Next j
For j = 0 To 9
    Put #1, I, CShapeFillColor(j)
    I = I + 1
Next j
For j = 0 To 9
    Put #1, I, CShapeBorderStyle(j)
    I = I + 1
Next j
For j = 0 To 9
    Put #1, I, CShapeBorderColor(j)
    I = I + 1
Next j
For j = 0 To 9
    Put #1, I, CShapeBorderWidth(j)
    I = I + 1
Next j
For j = 0 To 9
    Put #1, I, CShapeVert(j)
    I = I + 1
Next j
For j = 0 To 9
    Put #1, I, CShapeHoriz(j)
    I = I + 1
Next j
For j = 0 To 9
    Put #1, I, CShapeHeight(j)
    I = I + 1
Next j
For j = 0 To 9
    Put #1, I, CShapeWidth(j)
    I = I + 1
Next j
For j = 0 To 9
    Put #1, I, CFlash(j)
    I = I + 1
Next j
For j = 0 To 9
    Put #1, I, CChangeShape(j)
    I = I + 1
Next j
For j = 0 To 9
    Put #1, I, CChangeColor(j)
    I = I + 1
Next j
For j = 0 To 9
    Put #1, I, CFlashDuration(j)
    I = I + 1
Next j
For j = 0 To 9
    Put #1, I, CShapeDuration(j)
    I = I + 1
Next j
For j = 0 To 9
    Put #1, I, CColorDuration(j)
    I = I + 1
Next j
For j = 0 To 9
    Put #1, I, CShape(j)
    I = I + 1
Next j
For j = 0 To 9
    Put #1, I, CShapeAltColor(j)
    I = I + 1
Next j
For j = 0 To 9
    Put #1, I, CColorType(j)
    I = I + 1
Next j

Put #1, 353, sliderTextSpeed.Value
Put #1, 354, balBackground.Value
Put #1, 355, balCustom.Value
Put #1, 356, balVideo.Value
Put #1, 357, sliderTextFadeSpeed.Value
Put #1, 358, lblPopupSample.FontName
Put #1, 359, lblPopupSample.FontSize
Put #1, 360, lblPopupSample.FontBold
Put #1, 361, lblPopupSample.FontItalic
Put #1, 362, lblFlasherSample.FontName
Put #1, 363, lblFlasherSample.FontSize
Put #1, 364, lblFlasherSample.FontBold
Put #1, 365, lblFlasherSample.FontItalic
Put #1, 366, lblTextOnlySample.FontSize
Put #1, 367, GrockColor
Put #1, 368, GrockColor2
Put #1, 369, GrockColorMode
Put #1, 370, GrockFile
Put #1, 371, GrockShapeType
Put #1, 372, GrockNumShapes
Put #1, 373, GrockWidth
Put #1, 374, GrockOffset
Put #1, 375, GrockRadiusX
Put #1, 376, GrockRadiusY
Put #1, 377, GrockFade
Put #1, 378, GrockFontName
Put #1, 379, GrockFontSize
Put #1, 380, GrockFontBold
Put #1, 381, GrockFontItalic
Put #1, 382, GrockFontColor
Put #1, 383, GrockBackColor
Put #1, 384, GrockFrequency
Put #1, 385, GrockFrequency2
Put #1, 386, GrockDuration
Put #1, 387, GrockEnableTones
Put #1, 388, CircleCycle
Put #1, 389, CircleSpeedR
Put #1, 390, CircleSpeedG
Put #1, 391, CircleSpeedB
Put #1, 392, VisualMaker.Check7.Value
Put #1, 393, RLower
Put #1, 394, GLower
Put #1, 395, BLower
Put #1, 396, RUpper
Put #1, 397, GUpper
Put #1, 398, BUpper
Put #1, 399, GrockVolume
Put #1, 400, Int(Binaural.Slider1.Value)
Put #1, 401, Binaural.chkAlternate.Value
Put #1, 402, Int(Binaural.Slider3.Value)
Put #1, 403, Binaural.ShapeType.Value
Put #1, 404, VisualMaker.Check8.Value
Put #1, 405, Binaural.chkFlasherRate.Value
Put #1, 406, Int(Binaural.spinFlasherRate.Value)
Put #1, 407, GrockLoopText
Put #1, 408, GrockUseText
Close #1

Binaural.Hide

Call chkEnableSubliminals_Click
Call chkMonotone_Click
Call chkWhisper_Click
Call chkEnableVideo_Click
Call chkEnableInduction_Click
Call chkEnableDeepener_Click
Call chkEnableSuggestions_Click
Call chkEnableWakener_Click
Call chkEnableAudio_Click

Exit Sub

323 Exit Sub
325 Call ErrorReport("An error occurred while saving the file.", vbExclamation)
    Close #1
Exit Sub
End Sub

Private Sub cmdSpeakStop_Click()
If UseSAPI5 = False And chkEnableChar.Value = 1 Then
    Char.Stop 'MSAgent mode
ElseIf UseSAPI5 = True Then 'SAPI5 mode
    frmMain.Voice5.Speak vbNullString, SVSFPurgeBeforeSpeak
    If m_bPaused Then frmMain.Voice5.Resume
    SetSpeakingState False, False
Else
    frmMain.DSS.AudioReset 'DSS mode
End If

End Sub

Private Sub cmdSpeakText_Click()
If ExceptionHandlers = True Then On Error GoTo ErrorHandler
Dim Options As String

If UseSAPI5 = False Then
    'SAPI4 specific code
    Options = "\pit=" & sliderVoicePitch.Value & "\ \spd=" & sliderVoiceSpeed.Value & "\ \vol=" & sliderVoiceVolume.Value & "\ "
    If chkMonotone.Value = 1 Then Options = Options + " \Chr=""Monotone""\"
    If chkWhisper.Value = 1 Then Options = Options + " \Chr=""Whisper""\"
    If chkEnableChar.Value = 0 Then
        'Speak in DSS mode
        frmMain.DSS.TextData 0, 1, Options + txtSpeakTest.Text
    Else
        'Speak in MSAgent mode
        If ShowCharacter = False Then Char.Show True
        Char.Speak Options + txtSpeakTest.Text
    End If
Else
    'SAPI5 specific code
    Options = "<pitch middle=""" + LTrim$(Str$(sliderVoicePitch.Value)) + """>"
    Set frmMain.Voice5.AudioOutput = frmMain.Voice5.GetAudioOutputs().Item(AudioOutputCB.ListIndex)
    frmMain.Voice5.AllowAudioOutputFormatChangesOnNextSet = False
    frmMain.Voice5.AudioOutputStream.Format.Type = FormatCB.ItemData(FormatCB.ListIndex)
    Set frmMain.Voice5.AudioOutputStream = frmMain.Voice5.AudioOutputStream
    If Not (m_bPaused And m_bSpeaking) Then
        frmMain.Voice5.Speak Options + txtSpeakTest.Text, m_speakFlags
    End If
    If m_bPaused Then frmMain.Voice5.Resume
    SetSpeakingState True, False
End If

Exit Sub
ErrorHandler:
err.Source = "Session Configuration - cmdSpeakText"
Call ErrorReport("An error occurred while speaking the text.", vbExclamation)
SetSpeakingState False, m_bPaused
End Sub

Private Sub cmdTextColor_Click()
Dim I As Long
CommonDialog1.Color = lblTextOnlySample.ForeColor
CommonDialog1.flags = cdlCCFullOpen Or cdlCCRGBInit
CommonDialog1.ShowColor
I = CommonDialog1.Color
If I <> -1 Then lblTextOnlySample.ForeColor = I
End Sub

Private Sub cmdTextColorBack_Click()
Dim I As Long
CommonDialog1.Color = lblTextOnlySample.BackColor
CommonDialog1.flags = cdlCCFullOpen Or cdlCCRGBInit
CommonDialog1.ShowColor
I = CommonDialog1.Color
If I <> -1 Then lblTextOnlySample.BackColor = I
End Sub

Private Sub cmdTextOnlyFont_Click()
' Set Cancel to True.
   CommonDialog1.CancelError = True
   If ExceptionHandlers = True Then On Error GoTo ErrHandler
   
   'put current settings into the dialog box
   CommonDialog1.FontName = lblTextOnlySample.FontName
   CommonDialog1.FontSize = lblTextOnlySample.FontSize
   CommonDialog1.FontBold = lblTextOnlySample.FontBold
   CommonDialog1.FontItalic = lblTextOnlySample.FontItalic

   ' Set the Flags property.
   CommonDialog1.flags = cdlCFBoth
   ' Display the Font dialog box.
   CommonDialog1.ShowFont
   ' Set text properties according to user's
   ' selections.
   
   lblTextOnlySample.FontName = CommonDialog1.FontName
   lblTextOnlySample.FontSize = CommonDialog1.FontSize
   lblTextOnlySample.FontBold = CommonDialog1.FontBold
   lblTextOnlySample.FontItalic = CommonDialog1.FontItalic

Exit Sub

ErrHandler:
   ' User pressed Cancel button.
   Exit Sub
End Sub

Private Sub cmdVidAdd_Click()
If VidSpeedSlider.Max >= 30000 Then Exit Sub
VidSpeedSlider.Max = VidSpeedSlider.Max + 1000
End Sub

Private Sub cmdVidDefault_Click()
VidSpeedSlider.Value = 100
End Sub

Private Sub cmdVisMaker_Click()
VisualMaker.Show
End Sub

Private Sub Command1_Click()
' Set Cancel to True.
   CommonDialog1.CancelError = True
   If ExceptionHandlers = True Then On Error GoTo ErrHandler
   
   'put current settings into the dialog box
   CommonDialog1.FontName = lblFlasherSample.FontName
   CommonDialog1.FontSize = lblFlasherSample.FontSize
   CommonDialog1.FontBold = lblFlasherSample.FontBold
   CommonDialog1.FontItalic = lblFlasherSample.FontItalic

   ' Set the Flags property.
   CommonDialog1.flags = cdlCFBoth
   ' Display the Font dialog box.
   CommonDialog1.ShowFont
   ' Set text properties according to user's
   ' selections.
   
   lblFlasherSample.FontName = CommonDialog1.FontName
   lblFlasherSample.FontSize = CommonDialog1.FontSize
   lblFlasherSample.FontBold = CommonDialog1.FontBold
   lblFlasherSample.FontItalic = CommonDialog1.FontItalic

Exit Sub

ErrHandler:
   ' User pressed Cancel button.
   Exit Sub
End Sub

Private Sub fileAudio_Click()
AudioFile = fileAudio.List(fileAudio.ListIndex)
End Sub

Private Sub fileAudio_DblClick()
AudioFile = fileAudio.List(fileAudio.ListIndex)
Call frmPreview.PlayPreview(AudioFile, False)
End Sub

Public Sub fileCharacter_Click()
If ExceptionHandlers = True Then On Error GoTo ErrorHandler
Static OldCharacterFile As String
Static OldIndex As Integer

If Loading = True Or SynthSpeech = False Or UseSAPI5 = True Or chkEnableChar.Value = 0 Or SkipChar = True Then Exit Sub
If (Char Is Nothing) Then GoTo LoadOnly
Char.Hide
CharacterFile = fileCharacter.List(fileCharacter.ListIndex)
frmMain.Agent1.Characters.Unload "Hypnotist"
LoadOnly:
frmMain.Agent1.Characters.Load "Hypnotist", CharacterFile
Set Char = frmMain.Agent1.Characters("Hypnotist")
Char.MoveTo 10, 10
OrigWidth = Char.Width
OrigHeight = Char.Height
Char.Show
Char.Balloon.Style = &H21C000C
OldCharacterFile = CharacterFile
OldIndex = fileCharacter.ListIndex

'select character's voice on voice list
Dim I As Integer
With frmMain.DSS
    For I = 1 To .CountEngines
        If "{" + LCase$(.ModeID(I)) + "}" = LCase$(Char.TTSModeID) Then
            txtTTS.ListIndex = I - 1
            DefaultVoice = txtTTS.List(txtTTS.ListIndex)
            GoTo After
        End If
    Next
End With
After:
If (DefaultVoice <> CustomVoice) And (CustomVoice <> "") Then Call SelectFile(CustomVoice, 9)

Exit Sub
ErrorHandler:
err.Source = "Character Selection Box - fileCharacter"
Call ErrorReport("An error occurred while loading the animated character.", vbExclamation)
CharacterFile = OldCharacterFile 'if the system can't load the character, then load the previous one used
fileCharacter.ListIndex = OldIndex
End Sub

Private Sub fileCharacter_GotFocus()
CustomVoice = ""
End Sub


Private Sub fileDeepener_Click()
DeepenerFile = fileDeepener.List(fileDeepener.ListIndex)
End Sub

Private Sub fileDeepener_DblClick()
DeepenerFile = fileDeepener.List(fileDeepener.ListIndex)
ScriptMaker.Show
AutoLoadScript = App.Path + "\deepeners\" + DeepenerFile
Call ScriptMaker.mnuFileLoad_Click
End Sub

Private Sub fileInduction_Click()
InductionFile = fileInduction.List(fileInduction.ListIndex)
End Sub

Private Sub fileInduction_DblClick()
InductionFile = fileInduction.List(fileInduction.ListIndex)
ScriptMaker.Show
AutoLoadScript = App.Path + "\inductions\" + InductionFile
Call ScriptMaker.mnuFileLoad_Click
End Sub

Private Sub fileSubliminals_Click()
SubliminalsFile = fileSubliminals.List(fileSubliminals.ListIndex)
End Sub

Private Sub fileSubliminals_DblClick()
SubliminalsFile = fileSubliminals.List(fileSubliminals.ListIndex)
ScriptMaker.Show
AutoLoadScript = App.Path + "\subliminals\" + SubliminalsFile
Call ScriptMaker.mnuFileLoad_Click
End Sub

Private Sub fileSuggestions_Click()
SuggestionsFile = fileSuggestions.List(fileSuggestions.ListIndex)
End Sub

Private Sub fileSuggestions_DblClick()
SuggestionsFile = fileSuggestions.List(fileSuggestions.ListIndex)
ScriptMaker.Show
AutoLoadScript = App.Path + "\suggestions\" + SuggestionsFile
Call ScriptMaker.mnuFileLoad_Click
End Sub

Private Sub fileVideo_Click()
VideoFile = fileVideo.List(fileVideo.ListIndex)
End Sub

Private Sub fileVideo_DblClick()
VideoFile = fileVideo.List(fileVideo.ListIndex)
Call frmPreview.PlayPreview(VideoFile, True)
End Sub

Private Sub fileWakener_Click()
WakenerFile = fileWakener.List(fileWakener.ListIndex)
End Sub

Private Sub fileWakener_DblClick()
WakenerFile = fileWakener.List(fileWakener.ListIndex)
ScriptMaker.Show
AutoLoadScript = App.Path + "\wakenings\" + WakenerFile
Call ScriptMaker.mnuFileLoad_Click
End Sub

Private Sub Form_Activate()
lblLatencySamples.Caption = LatencySamples
If LatencySamples > 0 Then
    lblAverageLatency.Caption = Str$(AverageLatency) + " ms"
    lblMaxLatency.Caption = Str$(MaxLatency) + " ms"
End If

If SynthSpeech = False Then SSTab1.TabEnabled(3) = False Else SSTab1.TabEnabled(3) = True

'refresh file boxes
Dim I As Integer
Static OldIndex As Integer

With fileInduction
    .Refresh
    For I = 0 To .ListCount - 1
        If LCase$(.List(I)) = LCase$(InductionFile) Then .ListIndex = I
    Next I
End With

With fileDeepener
    .Refresh
    For I = 0 To .ListCount - 1
        If LCase$(.List(I)) = LCase$(DeepenerFile) Then .ListIndex = I
    Next I
End With

With fileSuggestions
    .Refresh
    For I = 0 To .ListCount - 1
        If LCase$(.List(I)) = LCase$(SuggestionsFile) Then .ListIndex = I
    Next I
End With

With fileWakener
    .Refresh
    For I = 0 To .ListCount - 1
        If LCase$(.List(I)) = LCase$(WakenerFile) Then .ListIndex = I
    Next I
End With

With fileVideo
    .Refresh
    For I = 0 To .ListCount - 1
        If LCase$(.List(I)) = LCase$(VideoFile) Then .ListIndex = I
    Next I
End With

SkipChar = True
With fileCharacter
    OldIndex = .ListIndex
    .Refresh
    For I = 0 To .ListCount - 1
        If LCase$(.List(I)) = LCase$(CharacterFile) Then .ListIndex = I
    Next I
End With
SkipChar = False
If OldIndex <> fileCharacter.ListIndex Then Call fileCharacter_Click

With fileSubliminals
    .Refresh
    For I = 0 To .ListCount - 1
        If LCase$(.List(I)) = LCase$(SubliminalsFile) Then .ListIndex = I
    Next I
End With

With fileAudio
    .Refresh
    For I = 0 To .ListCount - 1
        If LCase$(.List(I)) = LCase$(AudioFile) Then .ListIndex = I
    Next I
End With

If SynthSpeech = False Then
    chkEnableChar.Enabled = False
    chkEnableChar.Value = 0
    chkTextOnly.Value = 1
    cmdCharAnims.Enabled = False
End If
If SynthSpeech = True Then
    If UseSAPI5 = True Then
        FormatCB.Enabled = True
        AudioOutputCB.Enabled = True
        chkMonotone.Value = 0
        chkMonotone.Enabled = False
        chkWhisper.Value = 0
        chkWhisper.Enabled = False
        lblVoiceSpeed.Caption = "Voice Speed"
        
        'Change slider parameters
        sliderVoiceVolume.Min = 1
        sliderVoiceSpeed.Min = -10
        sliderVoicePitch.Min = -10
        If sliderVoiceVolume.Value > 100 Then sliderVoiceVolume.Value = 50
        If sliderVoiceSpeed.Value > 10 Then sliderVoiceSpeed.Value = 0
        If sliderVoicePitch.Value > 10 Then sliderVoicePitch.Value = -5
        sliderVoiceVolume.Max = 100
        sliderVoiceSpeed.Max = 10
        sliderVoicePitch.Max = 10
        sliderVoiceVolume.TickFrequency = 5
        sliderVoiceSpeed.TickFrequency = 1
        sliderVoicePitch.TickFrequency = 1
        chkEnableChar.Enabled = False
        chkEnableChar.Value = 0
        If GetINIString(1, "settings", "sapi5output") <> "" Then
            For I = 0 To (AudioOutputCB.ListCount - 1)
                If LCase$(AudioOutputCB.List(I)) = LCase$(GetINIString(1, "settings", "sapi5output")) Then AudioOutputCB.ListIndex = I
            Next I
        End If
        sliderVoiceSpeed.Value = frmMain.Voice5.Rate
        sliderVoiceVolume.Value = frmMain.Voice5.volume
    Else
        FormatCB.Enabled = False
        AudioOutputCB.Enabled = False
        chkMonotone.Enabled = True
        chkWhisper.Enabled = True
        lblVoiceSpeed.Caption = "Voice Speed, in WPM"
        
        'change slider parameters
        sliderVoiceVolume.Min = 1
        sliderVoiceVolume.Max = 65535
        sliderVoiceVolume.TickFrequency = 2000
        sliderVoiceSpeed.Min = 50
        sliderVoiceSpeed.Max = 250
        sliderVoiceSpeed.TickFrequency = 5
        sliderVoicePitch.Min = 50
        sliderVoicePitch.Max = 400
        sliderVoicePitch.TickFrequency = 7
        If optSessionSubliminal.Value = False Then
            chkEnableChar.Enabled = True
            cmdCharAnims.Enabled = True
        End If
    End If

If EngineName <> "" Then
    For I = 0 To (txtTTS.ListCount - 1)
        If LCase$(txtTTS.List(I)) = LCase$(EngineName) Then txtTTS.ListIndex = I: Exit Sub
    Next I
End If

End If

End Sub

Private Sub Form_Load()
If ExceptionHandlers = True Then On Error GoTo ErrorHandler

imgLogo.Picture = frmSplash.imgLogo
SSTab1.Tab = 0
Me.Left = (ScreenX / 2) - (Me.Width / 2)
Me.Top = (ScreenY / 2) - (Me.Height / 2)
If PerfMon = True Then chkPerfMon.Value = 1 Else chkPerfMon.Value = 0
If ScriptErrors = True Then chkShowErrors.Value = 1 Else chkShowErrors.Value = 0
If ScriptDebug = True Then chkDebug.Value = 1 Else chkDebug.Value = 0
If DisplayConsole = True Then chkShowConsole.Value = 1 Else chkShowConsole.Value = 0

fileInduction.Path = App.Path + "\inductions"
fileDeepener.Path = App.Path + "\deepeners"
fileSuggestions.Path = App.Path + "\suggestions"
fileWakener.Path = App.Path + "\wakenings"
fileVideo.Path = App.Path + "\videos"
fileCharacter.Path = GetWinPath + "\msagent\chars"
fileSubliminals.Path = App.Path + "\subliminals"
fileAudio.Path = App.Path + "\audio"

Call LoadSAPI

If SynthSpeech = True Then
    If UseSAPI5 = True Then
        FormatCB.Enabled = True
        AudioOutputCB.Enabled = True
        
        'Change slider parameters
        sliderVoiceVolume.Min = 1
        sliderVoiceSpeed.Min = -10
        If sliderVoiceVolume.Value > 100 Then sliderVoiceVolume.Value = 100
        If sliderVoiceSpeed.Value > 10 Then sliderVoiceSpeed.Value = 0
        sliderVoiceVolume.Max = 100
        sliderVoiceSpeed.Max = 10
        chkEnableChar.Enabled = False
        chkEnableChar.Value = 0
        cmdCharAnims.Enabled = False
    Else
        FormatCB.Enabled = False
        AudioOutputCB.Enabled = False
        
        'change slider parameters
        sliderVoiceVolume.Min = 1
        sliderVoiceVolume.Max = 65535
        sliderVoiceSpeed.Min = 50
        sliderVoiceSpeed.Max = 250
        chkEnableChar.Enabled = True
        cmdCharAnims.Enabled = True
    End If
End If
Exit Sub

ErrorHandler:
err.Source = "Session Config Window Loader"
   Call ErrorReport("An error occurred while setting up the session configuration.", vbExclamation)

End Sub

Private Sub opt1024_Click()
ScreenRes = 2
End Sub

Private Sub opt320_Click()
ScreenRes = 5
End Sub

Private Sub opt640_Click()
ScreenRes = 4
End Sub

Private Sub opt800_Click()
ScreenRes = 3
End Sub

Private Sub optNoChange_Click()
ScreenRes = 1
End Sub

Private Sub optSessionBackground_Click()
chkEnableVideo.Value = 0
chkEnableChar.Value = 0
chkEnable3D.Value = 0
chkEnableFlashers.Value = 0
chkEnableVisuals.Value = 0

chkEnableInduction.Enabled = True
chkEnableDeepener.Enabled = True
chkEnableSuggestions.Enabled = True
chkEnableWakener.Enabled = True
chkEnableSubliminals.Enabled = True
chkEnableVideo.Enabled = False
chkEnableChar.Enabled = True
chkEnableAudio.Enabled = True
chkEnableCustom.Enabled = True
chkEnable3D.Enabled = False
chkEnableBinaural.Enabled = True
chkEnableFlashers.Enabled = False
chkEnableVisuals.Enabled = False
chkTextOnly.Enabled = True

frameSessionStart.Enabled = True
lblSessionHours2.Enabled = True
lblSessionMinutes2.Enabled = True
UpDownHours.Enabled = True
UpDownMinutes.Enabled = True
optStartInTime.Enabled = True
optStartAtRandom.Enabled = True
lblSessionHours.Enabled = True
lblSessionMinutes.Enabled = True
chkScroll.Value = 0
chkScroll.Enabled = False
frameScreenSize.Enabled = False
optFullScreen.Enabled = False
optWindowed.Enabled = False
txtHorizSize.Enabled = False
txtVertSize.Enabled = False
lblScreenHorizSize.Enabled = False
lblScreenVertSize.Enabled = False
txtHorizSize.Enabled = False
txtVertSize.Enabled = False
End Sub

Private Sub optSessionPopup_Click()
chkEnableInduction.Enabled = True
chkEnableDeepener.Enabled = True
chkEnableSuggestions.Enabled = True
chkEnableWakener.Enabled = True
chkEnableSubliminals.Enabled = True
chkEnableVideo.Enabled = True
chkEnableChar.Enabled = True
chkEnableAudio.Enabled = True
chkEnableCustom.Enabled = True
chkEnable3D.Enabled = True
chkEnableBinaural.Enabled = True
chkEnableFlashers.Enabled = True
chkEnableVisuals.Enabled = True
chkTextOnly.Enabled = True

frameSessionStart.Enabled = True
lblSessionHours2.Enabled = True
lblSessionMinutes2.Enabled = True
UpDownHours.Enabled = True
UpDownMinutes.Enabled = True
optStartInTime.Enabled = True
optStartAtRandom.Enabled = True
lblSessionHours.Enabled = True
lblSessionMinutes.Enabled = True
chkScroll.Enabled = True
frameScreenSize.Enabled = True
optFullScreen.Enabled = True
optWindowed.Enabled = True
lblScreenHorizSize.Enabled = False
lblScreenVertSize.Enabled = False
txtHorizSize.Enabled = False
txtVertSize.Enabled = False
End Sub

Private Sub optSessionStandard_Click()
chkEnableInduction.Enabled = True
chkEnableDeepener.Enabled = True
chkEnableSuggestions.Enabled = True
chkEnableWakener.Enabled = True
chkEnableSubliminals.Enabled = True
chkEnableVideo.Enabled = True
chkEnableChar.Enabled = True
chkEnableAudio.Enabled = True
chkEnableCustom.Enabled = True
chkEnable3D.Enabled = True
chkEnableBinaural.Enabled = True
chkEnableFlashers.Enabled = True
chkEnableVisuals.Enabled = True
chkTextOnly.Enabled = True

frameSessionStart.Enabled = False
lblSessionHours2.Enabled = False
lblSessionMinutes2.Enabled = False
UpDownHours.Enabled = False
UpDownMinutes.Enabled = False
optStartInTime.Enabled = False
optStartAtRandom.Enabled = False
lblSessionHours.Enabled = False
lblSessionMinutes.Enabled = False
chkScroll.Enabled = True
frameScreenSize.Enabled = True
optFullScreen.Enabled = True
optWindowed.Enabled = True
lblScreenHorizSize.Enabled = False
lblScreenVertSize.Enabled = False
txtHorizSize.Enabled = False
txtVertSize.Enabled = False
End Sub

Private Sub optSessionSubliminal_Click()
chkEnableInduction.Value = 0
chkEnableDeepener.Value = 0
chkEnableSuggestions.Value = 0
chkEnableWakener.Value = 0
chkEnableVideo.Value = 0
chkEnableChar.Value = 0
chkEnableAudio.Value = 0
chkEnableCustom.Value = 0
chkEnable3D.Value = 0
chkEnableBinaural.Value = 0
chkEnableFlashers.Value = 0
chkEnableVisuals.Value = 0
chkTextOnly.Value = 0

chkEnableInduction.Enabled = False
chkEnableDeepener.Enabled = False
chkEnableSuggestions.Enabled = False
chkEnableWakener.Enabled = False
chkEnableSubliminals.Enabled = True
chkEnableVideo.Enabled = False
chkEnableChar.Enabled = False
chkEnableAudio.Enabled = False
chkEnableCustom.Enabled = False
chkEnable3D.Enabled = False
chkEnableBinaural.Enabled = False
chkEnableFlashers.Enabled = False
chkEnableVisuals.Enabled = False
chkTextOnly.Enabled = False

frameSessionStart.Enabled = True
lblSessionHours2.Enabled = True
lblSessionMinutes2.Enabled = True
UpDownHours.Enabled = True
UpDownMinutes.Enabled = True
optStartInTime.Enabled = True
optStartAtRandom.Enabled = True
lblSessionHours.Enabled = True
lblSessionMinutes.Enabled = True
chkScroll.Value = 0
chkScroll.Enabled = False
frameScreenSize.Enabled = False
optFullScreen.Enabled = False
optWindowed.Enabled = False
lblScreenHorizSize.Enabled = False
lblScreenVertSize.Enabled = False
txtHorizSize.Enabled = False
txtVertSize.Enabled = False
End Sub

Private Sub optWindowed_Click()
If chkScroll.Value = 1 Then chkScroll.Value = 0
End Sub

Private Sub ResTimer_Timer()
ResTimer.Enabled = False
Call ChangeRes(CurrentResX, CurrentResY)
optNoChange.Value = True
frmMain.Show
Me.Show
End Sub

Private Sub SliderCharHoriz_Change()
lblCharHoriz2.Caption = LTrim$(Str$(SliderCharHoriz.Value))
End Sub

Private Sub SliderCharVert_Change()
lblCharVert2.Caption = LTrim$(Str$(SliderCharVert.Value))
End Sub


Private Sub SliderCharZoom_Change()
lblCharZoom2.Caption = LTrim$(Str$(SliderCharZoom.Value))
End Sub


Private Sub SliderCustomZoom_Change()
lblCustomZoom2.Caption = LTrim$(Str$(SliderCustomZoom.Value))
End Sub


Private Sub SliderVideoZoom_Change()
lblVidZoom2.Caption = LTrim$(Str$(SliderVideoZoom.Value))
End Sub

Private Sub sliderVoiceSpeed_Change()
    If SynthSpeech = True And UseSAPI5 = True And Loading = False Then frmMain.Voice5.Rate = sliderVoiceSpeed.Value
End Sub

Private Sub sliderVoiceVolume_Change()
    If SynthSpeech = True And UseSAPI5 = True And Loading = False Then frmMain.Voice5.volume = sliderVoiceVolume.Value
End Sub

Private Sub txtTTS_Change()
If TTSFocus = True Then
    CustomVoice = txtTTS.List(txtTTS.ListIndex)
    TTSFocus = False
End If
End Sub

Private Sub txtTTS_Click()
    On Error GoTo Error_Handler
    
    Dim I As Long
    
    I = txtTTS.ItemData(txtTTS.ListIndex)
    
    If UseSAPI5 = False Then
        With frmMain.DSS
            txtAge.Text = .Age(I)
            txtDialect.Text = .Dialect(I)
            txtFeatures.Text = .Features(I)
            txtGender.Text = .Gender(I) & " (" & IIf(.Gender(I) = 1, "Female", "Male") & ")"
            txtInterfaces.Text = .Interfaces(I)
            txtLanguageID.Text = .LanguageID(I)
            txtMfgName.Text = .MfgName(I)
            txtModeID.Text = .ModeID(I)
            txtModeName.Text = .ModeName(I)
            txtProductName.Text = .ProductName(I)
            txtSpeaker.Text = .Speaker(I)
            txtStyle.Text = .Style(I)
        End With
        'Change Voice
        frmMain.DSS.Select I 'DSS
        If chkEnableChar.Value = 1 Then Char.TTSModeID = "{" & txtModeID.Text & "}" 'MSAgent
        EngineName = txtModeName.Text
    Else
        Set frmMain.Voice5.Voice = frmMain.Voice5.GetVoices().Item(txtTTS.ListIndex)
        EngineName = txtTTS.List(txtTTS.ListIndex)
    End If
    
Exit Sub

Error_Handler:
    If err.Number = 430 Then Resume Next 'this error happens a lot; just ignore it
    err.Source = "Voice Selection"
    Call ErrorReport("An error occurred while selecting a voice from the selection list.", vbExclamation)
    Exit Sub
End Sub

Public Sub SelectFile(Filename As String, Section As Integer)
If Trim2(Filename) = "" Then Exit Sub

If InStr(Filename, "://") > 0 Then
    'filename is a url
    If Section = 1 Then
        InductionFile = Filename
        frmSession.fileInduction.Enabled = False
        Exit Sub
    End If
    If Section = 2 Then
        DeepenerFile = Filename
        frmSession.fileDeepener.Enabled = False
        Exit Sub
    End If
    If Section = 3 Then
        SuggestionsFile = Filename
        frmSession.fileSuggestions.Enabled = False
        Exit Sub
    End If
    If Section = 4 Then
        WakenerFile = Filename
        frmSession.fileWakener.Enabled = False
        Exit Sub
    End If
    If Section = 5 Then
        AudioFile = Filename
        frmSession.fileAudio.Enabled = False
        Exit Sub
    End If
    If Section = 6 Then
        VideoFile = Filename
        frmSession.fileVideo.Enabled = False
        Exit Sub
    End If
    If Section = 8 Then
        SubliminalsFile = Filename
        frmSession.fileSubliminals.Enabled = False
        Exit Sub
    End If
End If

'selects a file in one of the file list boxes
Dim I As Integer
Dim FileList As Object
If Section = 1 Then Set FileList = fileInduction
If Section = 2 Then Set FileList = fileDeepener
If Section = 3 Then Set FileList = fileSuggestions
If Section = 4 Then Set FileList = fileWakener
If Section = 5 Then Set FileList = fileAudio
If Section = 6 Then Set FileList = fileVideo
If Section = 7 Then Set FileList = fileCharacter
If Section = 8 Then Set FileList = fileSubliminals
If Section = 9 Then Set FileList = txtTTS

If (Section = 7 Or Section = 9) And SynthSpeech = False Then Exit Sub
If Section = 7 And UseSAPI5 = True Then Exit Sub
If Section = 7 Then CustomVoice = ""
If Section = 9 Then CustomVoice = Filename

For I = 0 To (FileList.ListCount - 1)
    If LCase$(FileList.List(I)) = LCase$(Filename) Then
        FileList.ListIndex = I
        Exit Sub
    End If
Next I

'file not found
Dim FileType As String
If Section = 1 Then FileType = "Induction file"
If Section = 1 Then FileType = "Deepener file"
If Section = 1 Then FileType = "Suggestions file"
If Section = 1 Then FileType = "Wakener file"
If Section = 1 Then FileType = "Audio file"
If Section = 1 Then FileType = "Video file"
If Section = 1 Then FileType = "Character file"
If Section = 1 Then FileType = "Subliminals file"
If Section = 1 Then FileType = "Voice type"

MsgBox FileType + " " + Filename + " not found", vbExclamation, "Virtual Hypnotist"
End Sub

Public Sub LoadDefaults(VersionNum As Single, LoadingPreset As Boolean)
'Load defaults for new options, if older file was loaded
Dim I As Integer
Dim TurnOffLoading As Boolean

If Loading = False Then
    Loading = True
    TurnOffLoading = True
Else
    TurnOffLoading = False
End If

If VersionNum < 5.61 Then
    GrockLoopText = False
    GrockUseText = True
End If

If VersionNum < 5.41 Then
    Binaural.chkFlasherRate = 0
    Binaural.spinFlasherRate = 60
End If

If VersionNum < 5.4 Then
    Binaural.Slider1.Value = 2
    Binaural.chkAlternate.Value = 1
    Binaural.Slider3.Value = 100
    Binaural.ShapeType.Value = 0
    VisualMaker.Check8.Value = 1
End If

If VersionNum < 5.3 Then
    GrockColor = vbBlue
    GrockColor2 = vbGreen
    GrockColorMode = 1
    GrockShapeType = 0
    GrockNumShapes = 20
    GrockWidth = 2
    GrockOffset = 0
    GrockRadiusX = 100
    GrockRadiusY = 100
    GrockEnableTones = True
    GrockFrequency = 1000
    GrockFrequency2 = 50
    GrockDuration = 40
    GrockVolume = -1500
    GrockFade = True
    GrockReset = True
    GrockFontName = "Arial"
    GrockFontSize = 28
    GrockFontBold = True
    GrockFontItalic = False
    GrockFontColor = vbCyan
    GrockBackColor = vbBlack
    GrockFile = ""

    lblPopupSample.FontName = "MS Sans Serif"
    lblPopupSample.FontSize = 15
    lblPopupSample.FontBold = True
    lblPopupSample.FontItalic = False
    lblFlasherSample.FontName = "MS Sans Serif"
    lblFlasherSample.FontSize = 12
    lblPopupSample.FontBold = True
    lblPopupSample.FontItalic = False
    
    CircleCycle = 1
    CircleSpeedR = 1
    CircleSpeedG = 1
    CircleSpeedB = 1
    RLower = 5
    GLower = 2
    BLower = 3
    RUpper = 255
    GUpper = 254
    BUpper = 252

End If

If VersionNum < 5.2 Then
    balBackground.Value = 0
    balCustom.Value = 0
    balVideo.Value = 0
    sliderTextSpeed.Value = 5000
    sliderTextFadeSpeed.Value = 4
End If

If VersionNum < 5 Then
    txtCustomAudio.Text = ""
    volBackground.Value = -600
    volCustom.Value = -600
    volVideo.Value = -600
    optFullScreen.Value = True
    txtHorizSize.Text = "800"
    txtVertSize.Text = "600"
    If SynthSpeech = True Then
        chkTextOnly.Value = 0
    Else
        chkTextOnly.Value = 1
    End If
    sliderDuration.Value = 10
    optHypnoMachine.Value = True
    If Tunnel = False Then
        VisualMode = 1
    Else
        VisualMode = 0
    End If
End If

If VersionNum < 4.5 Then
    VisualMaker.Check4.Value = 1
    VisualMaker.Slider3.Value = 1000
    VisualMaker.Slider4.Value = 1000
    VisualMaker.Slider5.Value = 25
    VisualMaker.Slider7.Value = 100
    VisualMaker.Label16.Caption = "1"
    VisualMaker.Label1.Caption = "6000"
    VisualMaker.Option3.Value = True
    VisualMaker.Option4.Value = False
    VisualMaker.Option5.Value = False
    VisualMaker.Check1.Value = 0
    VisualMaker.Check2.Value = 0
    VisualMaker.Check3.Value = 0
    SpiralColor = -1
End If

If VersionNum < 4.41 Then
    txtFlash1.Text = "Relaxed? Sink deep into hypnosis"
    txtFlash2.Text = "Worried? Feel comfortable"
    txtFlash3.Text = "Unfocused? Listen, obey and focus"
    txtFlash4.Text = "Nervous? Feel calm and relaxed"
    txtFlash5.Text = ""
    txtFlash6.Text = ""
    txtFlash7.Text = ""
    txtFlash8.Text = ""
    chkFlash1.Value = 1
    chkFlash2.Value = 1
    chkFlash3.Value = 1
    chkFlash4.Value = 1
    chkFlash5.Value = 0
    chkFlash6.Value = 0
    chkFlash7.Value = 0
    chkFlash8.Value = 0
    sliderMessageSpeed.Value = 300
    lblPopupSample.BackColor = &H0&
    lblPopupSample.ForeColor = &H404040
    lblFlasherSample.BackColor = &H0&
    lblFlasherSample.ForeColor = &H60606
End If

If VersionNum < 4.3 Then
    VidSpeedSlider.Value = 100
    AudioSpeedSlider.Value = 100
End If

If VersionNum < 4.2 Then
    SliderCustomZoom.Value = 90
    chkEnableVisuals.Value = 0
    VisualMode = 1
    VisualMaker.SSTab1.Tab = 1
    VisualMaker.Slider2.Value = 30
    SpiralThickness = 1
    VisualMaker.Slider1.Value = 25
    ScreenRes = 1
    optNoChange.Value = True
End If

If VersionNum < 4 Then
    chkEnableBinaural.Value = 0
    chkEnableFlashers.Value = 0
    If getWindowsVersion(0) = 1 Or (getWindowsVersion(0) = 2 And getWindowsVersion(1) > 4) Then
        Frequency1 = 159
        Frequency2 = 165
        'SetVolume = -2500
        SetVolume = -2000
        PanVal = 5000
        SetMVolume = -2000
        ShapeAColor1 = RGB(0, 255, 0)
        ShapeAColor2 = RGB(0, 0, 0)
        ShapeBColor1 = RGB(0, 0, 0)
        ShapeBColor2 = RGB(0, 220, 255)
        BarWidth = 10
    End If
    chkScroll.Value = 0
    txtSessionName.Text = ""
    txtSessionAuthor.Text = ""
    txtSessionComments.Text = ""
    lblSessionDate.Caption = ""
End If

If VersionNum < 3.2 And SynthSpeech = True And LoadingPreset = False Then
    If UseSAPI5 = False Then EngineName = "Mike" Else EngineName = "Microsoft Mike"
    For I = 0 To (txtTTS.ListCount - 1)
        If LCase$(txtTTS.List(I)) = LCase$(EngineName) Then txtTTS.ListIndex = I
    Next I
End If

If VersionNum < 3.1 Then
    sliderCycleTime.Value = 1
    sliderCyclesPerMessage.Value = 100
End If

If TurnOffLoading = True Then Loading = False

End Sub

Private Sub AddItemToFmtCB()
    AddFmts "SAFT8kHz8BitMono", SAFT8kHz16BitMono
    AddFmts "SAFT8kHz8BitStereo", SAFT8kHz8BitStereo
    AddFmts "SAFT8kHz16BitMono", SAFT8kHz16BitMono
    AddFmts "SAFT8kHz16BitStereo", SAFT8kHz16BitStereo
    
    AddFmts "SAFT11kHz8BitMono", SAFT11kHz8BitMono
    AddFmts "SAFT11kHz8BitStereo", SAFT11kHz8BitStereo
    AddFmts "SAFT11kHz16BitMono", SAFT11kHz16BitMono
    AddFmts "SAFT11kHz16BitStereo", SAFT11kHz16BitStereo
    
    AddFmts "SAFT12kHz8BitMono", SAFT12kHz8BitMono
    AddFmts "SAFT12kHz8BitStereo", SAFT12kHz8BitStereo
    AddFmts "SAFT12kHz16BitMono", SAFT12kHz16BitMono
    AddFmts "SAFT12kHz16BitStereo", SAFT12kHz16BitStereo
    
    AddFmts "SAFT16kHz8BitMono", SAFT16kHz8BitMono
    AddFmts "SAFT16kHz8BitStereo", SAFT16kHz8BitStereo
    AddFmts "SAFT16kHz16BitMono", SAFT16kHz16BitMono
    AddFmts "SAFT16kHz16BitStereo", SAFT16kHz16BitStereo
    
    AddFmts "SAFT22kHz8BitMono", SAFT22kHz8BitMono
    AddFmts "SAFT22kHz8BitStereo", SAFT22kHz8BitStereo
    AddFmts "SAFT22kHz16BitMono", SAFT22kHz16BitMono
    AddFmts "SAFT22kHz16BitStereo", SAFT22kHz16BitStereo
    
    AddFmts "SAFT24kHz8BitMono", SAFT24kHz8BitMono
    AddFmts "SAFT24kHz8BitStereo", SAFT24kHz8BitStereo
    AddFmts "SAFT24kHz16BitMono", SAFT24kHz16BitMono
    AddFmts "SAFT24kHz16BitStereo", SAFT24kHz16BitStereo
    
    AddFmts "SAFT32kHz8BitMono", SAFT32kHz8BitMono
    AddFmts "SAFT32kHz8BitStereo", SAFT32kHz8BitStereo
    AddFmts "SAFT32kHz16BitMono", SAFT32kHz16BitMono
    AddFmts "SAFT32kHz16BitStereo", SAFT32kHz16BitStereo
    
    AddFmts "SAFT44kHz8BitMono", SAFT44kHz8BitMono
    AddFmts "SAFT44kHz8BitStereo", SAFT44kHz8BitStereo
    AddFmts "SAFT44kHz16BitMono", SAFT44kHz16BitMono
    AddFmts "SAFT44kHz16BitStereo", SAFT44kHz16BitStereo
    
    AddFmts "SAFT48kHz8BitMono", SAFT48kHz8BitMono
    AddFmts "SAFT48kHz8BitStereo", SAFT48kHz8BitStereo
    AddFmts "SAFT48kHz16BitMono", SAFT48kHz16BitMono
    AddFmts "SAFT48kHz16BitStereo", SAFT48kHz16BitStereo
End Sub

Private Sub AddFmts(ByRef Name As String, ByVal fmt As SpeechAudioFormatType)
    Dim Index As String
    
    ' get the count of existing list so that we are adding to the bottom of the list
    Index = FormatCB.ListCount
    
    ' add the name to the list box and associate the format type with the item
    FormatCB.AddItem Name, Index
    FormatCB.ItemData(Index) = fmt
End Sub

Public Sub LoadSAPI()
If SynthSpeech = False Then Exit Sub

txtTTS.Clear
FormatCB.Clear
AudioOutputCB.Clear

If UseSAPI5 = False Then
'SAPI4 Voice Listing Code
'Originally coded by Gordon Scott Bell.
'Modified by abhishek http://msagentworld.tripod.com
'Modified by FollowtheWatch55

    If ExceptionHandlers = True Then On Error GoTo Error_Handler
    
    Dim I As Integer
    
    With frmMain.DSS
        For I = 1 To .CountEngines
            txtTTS.AddItem .ModeName(I)
            txtTTS.ItemData(txtTTS.NewIndex) = I
        Next
    End With
End If

If UseSAPI5 = True Then
'SAPI5 Voice Listing Code

    For Each Token In frmMain.Voice5.GetVoices
        txtTTS.AddItem (Token.GetDescription())
    Next
    
    'load the format combo box
    Call AddItemToFmtCB
    
    'set the default format
    FormatCB.Text = DefaultFmt
    
    ' Load the audio output combo box
    If frmMain.Voice5.GetAudioOutputs.Count > 0 Then
        For Each Token In frmMain.Voice5.GetAudioOutputs
            AudioOutputCB.AddItem (Token.GetDescription)
        Next
    Else
        AudioOutputCB.AddItem "Error"
        AudioOutputCB.Enabled = False
    End If
    AudioOutputCB.ListIndex = 0
    
    'load pause time
    sliderPauseTime.Value = Int(GetINIString(1, "settings", "sapi5pausetime", "5000"))

End If

    If EngineName <> "" Then
        For I = 0 To (txtTTS.ListCount - 1)
            If LCase$(txtTTS.List(I)) = LCase$(EngineName) Then txtTTS.ListIndex = I: Exit Sub
        Next I
    End If
    
Exit Sub
Error_Handler:
err.Source = "SAPI Loader"
Call ErrorReport("An error occurred while initalizing the SAPI synthesis interface.", vbExclamation)
End Sub


Private Sub txtTTS_GotFocus()
TTSFocus = True
End Sub


Private Sub txtTTS_LostFocus()
TTSFocus = False
End Sub

Private Sub volBackground_Change()
lblBackVol.Caption = LTrim$(Str$(volBackground.Value))
End Sub

Private Sub volCustom_Change()
lblCustVol.Caption = LTrim$(Str$(volCustom.Value))
End Sub

Private Sub volVideo_Change()
lblVidVol.Caption = LTrim$(Str$(volVideo.Value))
End Sub

