VERSION 5.00
Begin VB.Form frmUser 
   BorderStyle     =   4  'Fixed ToolWindow
   Caption         =   "User Information"
   ClientHeight    =   4155
   ClientLeft      =   4170
   ClientTop       =   3390
   ClientWidth     =   4200
   Icon            =   "frmUser.frx":0000
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   4155
   ScaleWidth      =   4200
   Begin VB.ComboBox Combo1 
      Height          =   315
      Left            =   1920
      Style           =   2  'Dropdown List
      TabIndex        =   7
      ToolTipText     =   "Select your age from the list"
      Top             =   2280
      Width           =   735
   End
   Begin VB.CommandButton Command2 
      Caption         =   "Help"
      Height          =   375
      Left            =   2160
      TabIndex        =   11
      ToolTipText     =   "User information help"
      Top             =   3600
      Width           =   1095
   End
   Begin VB.CommandButton Command1 
      Caption         =   "OK"
      Default         =   -1  'True
      Height          =   375
      Left            =   840
      TabIndex        =   10
      Top             =   3600
      Width           =   1095
   End
   Begin VB.TextBox Text2 
      Alignment       =   2  'Center
      Height          =   375
      Left            =   360
      TabIndex        =   9
      Text            =   "Sleep"
      ToolTipText     =   "Enter your preferred induction trigger word/phrase"
      Top             =   3000
      Width           =   3375
   End
   Begin VB.OptionButton Option2 
      Caption         =   "Female"
      Height          =   255
      Left            =   2160
      TabIndex        =   5
      ToolTipText     =   "Select your gender"
      Top             =   1920
      Width           =   1095
   End
   Begin VB.OptionButton Option1 
      Caption         =   "Male"
      Height          =   255
      Left            =   1200
      TabIndex        =   4
      ToolTipText     =   "Select your gender"
      Top             =   1920
      Value           =   -1  'True
      Width           =   735
   End
   Begin VB.TextBox Text1 
      Alignment       =   2  'Center
      Height          =   375
      Left            =   360
      TabIndex        =   2
      Text            =   "User"
      ToolTipText     =   "Enter your name here"
      Top             =   1080
      Width           =   3375
   End
   Begin VB.Label Label5 
      Alignment       =   2  'Center
      Caption         =   "Age:"
      Height          =   255
      Left            =   1200
      TabIndex        =   6
      Top             =   2330
      Width           =   735
   End
   Begin VB.Label Label4 
      Alignment       =   2  'Center
      Caption         =   "Preferred Induction Trigger Word/Phrase"
      Height          =   255
      Left            =   0
      TabIndex        =   8
      Top             =   2760
      Width           =   4215
   End
   Begin VB.Label Label3 
      Alignment       =   2  'Center
      Caption         =   "Gender"
      Height          =   255
      Left            =   0
      TabIndex        =   3
      Top             =   1680
      Width           =   4215
   End
   Begin VB.Label Label2 
      Alignment       =   2  'Center
      Caption         =   "Name"
      Height          =   255
      Left            =   0
      TabIndex        =   1
      Top             =   840
      Width           =   4215
   End
   Begin VB.Label Label1 
      Alignment       =   2  'Center
      Caption         =   "Enter your personal information here, for use in sessions."
      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            =   120
      TabIndex        =   0
      Top             =   120
      Width           =   3975
   End
End
Attribute VB_Name = "frmUser"
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.

Option Explicit

Private Sub Command1_Click()
WriteINIString 1, "settings", "name", Text1.Text
If Option1.value = True Then WriteINIString 1, "settings", "gender", "Male": UserGender = "Male"
If Option2.value = True Then WriteINIString 1, "settings", "gender", "Female": UserGender = "Female"
WriteINIString 1, "settings", "trigger", Text2.Text
WriteINIString 1, "settings", "age", Combo1.List(Combo1.ListIndex)
UserName = Text1.Text
UserTrigger = Text2.Text
UserAge = Val(Combo1.List(Combo1.ListIndex))
If MainScreenOn = False Then frmMain.Show
Me.Hide
End Sub

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

Shell "hh " + App.path + "\vh.chm::/userinfo.html", vbNormalFocus
Exit Sub

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

Private Sub Form_Load()
Dim i As Integer
For i = 13 To 99
    Combo1.AddItem Trim2(Val(i))
Next i

Me.Left = (ScreenX / 2) - (Me.Width / 2)
Me.top = (ScreenY / 2) - (Me.Height / 2)
Text1.Text = GetINIString(1, "settings", "name", "User")
Text2.Text = GetINIString(1, "settings", "trigger", "Sleep")
If GetINIString(1, "settings", "gender", "Male") = "Male" Then Option1.value = True Else Option2.value = True
UserName = Text1.Text
UserTrigger = Text2.Text
If Option1.value = True Then UserGender = "Male"
If Option2.value = True Then UserGender = "Female"
Combo1.ListIndex = Val(GetINIString(1, "settings", "age", "18")) - 13
End Sub

