VERSION 5.00
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCTL.OCX"
Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "COMDLG32.OCX"
Begin VB.Form FileEditor 
   Caption         =   "Session File Editor"
   ClientHeight    =   7410
   ClientLeft      =   2355
   ClientTop       =   1920
   ClientWidth     =   9555
   Icon            =   "FileEditor.frx":0000
   LinkTopic       =   "Form1"
   ScaleHeight     =   7410
   ScaleWidth      =   9555
   Begin VB.Timer Timer1 
      Interval        =   100
      Left            =   8280
      Top             =   5880
   End
   Begin VB.CommandButton Command4 
      Caption         =   "Help"
      Height          =   375
      Left            =   3960
      TabIndex        =   14
      ToolTipText     =   "File editor help"
      Top             =   6840
      Width           =   1575
   End
   Begin MSComctlLib.ListView ListView1 
      Height          =   5415
      Left            =   240
      TabIndex        =   1
      Top             =   120
      Width           =   6615
      _ExtentX        =   11668
      _ExtentY        =   9551
      View            =   3
      LabelEdit       =   1
      LabelWrap       =   -1  'True
      HideSelection   =   -1  'True
      FullRowSelect   =   -1  'True
      GridLines       =   -1  'True
      _Version        =   393217
      ForeColor       =   -2147483640
      BackColor       =   -2147483643
      BorderStyle     =   1
      Appearance      =   1
      NumItems        =   0
   End
   Begin MSComDlg.CommonDialog CommonDialog1 
      Left            =   0
      Top             =   5040
      _ExtentX        =   847
      _ExtentY        =   847
      _Version        =   393216
   End
   Begin VB.Frame Frame1 
      Caption         =   "Edit Parameter"
      Height          =   4575
      Left            =   6960
      TabIndex        =   3
      Top             =   960
      Width           =   2535
      Begin VB.CheckBox Check5 
         Caption         =   "Single Value"
         Enabled         =   0   'False
         Height          =   255
         Left            =   240
         TabIndex        =   15
         Top             =   1560
         Width           =   2055
      End
      Begin VB.CommandButton Command3 
         Caption         =   "Save Value"
         Height          =   375
         Left            =   480
         TabIndex        =   11
         ToolTipText     =   "Store new value into file. Warning: changes are permanent!"
         Top             =   4080
         Width           =   1695
      End
      Begin VB.CheckBox Check3 
         Caption         =   "Long Integer Value"
         Enabled         =   0   'False
         Height          =   255
         Left            =   240
         TabIndex        =   7
         Top             =   1080
         Width           =   2055
      End
      Begin VB.CheckBox Check4 
         Caption         =   "Boolean Value"
         Enabled         =   0   'False
         Height          =   255
         Left            =   240
         TabIndex        =   8
         Top             =   1320
         Width           =   2055
      End
      Begin VB.CheckBox Check2 
         Caption         =   "Integer Value"
         Enabled         =   0   'False
         Height          =   255
         Left            =   240
         TabIndex        =   6
         Top             =   840
         Width           =   2055
      End
      Begin VB.CheckBox Check1 
         Caption         =   "String Value"
         Enabled         =   0   'False
         Height          =   255
         Left            =   240
         TabIndex        =   5
         Top             =   600
         Width           =   2055
      End
      Begin VB.TextBox Text1 
         Height          =   1455
         Left            =   120
         MultiLine       =   -1  'True
         ScrollBars      =   1  'Horizontal
         TabIndex        =   10
         Top             =   2520
         Width           =   2295
      End
      Begin VB.Label Label6 
         Height          =   255
         Left            =   1680
         TabIndex        =   17
         Top             =   1920
         Width           =   735
      End
      Begin VB.Label Label5 
         Caption         =   "Characters:"
         Height          =   255
         Left            =   600
         TabIndex        =   16
         Top             =   1920
         Width           =   975
      End
      Begin VB.Label Label2 
         Alignment       =   2  'Center
         Caption         =   "Data Type:"
         Height          =   255
         Left            =   240
         TabIndex        =   4
         Top             =   240
         Width           =   2055
      End
      Begin VB.Label Label1 
         Alignment       =   2  'Center
         Caption         =   "Value:"
         Height          =   255
         Left            =   360
         TabIndex        =   9
         Top             =   2160
         Width           =   1815
      End
   End
   Begin VB.CommandButton Command2 
      Caption         =   "Exit"
      Default         =   -1  'True
      Height          =   375
      Left            =   5880
      TabIndex        =   0
      Top             =   6840
      Width           =   1575
   End
   Begin VB.CommandButton Command1 
      Caption         =   "Open Session File"
      Height          =   375
      Left            =   2040
      TabIndex        =   13
      ToolTipText     =   "Load a session file for editing"
      Top             =   6840
      Width           =   1575
   End
   Begin VB.Label Label4 
      Alignment       =   2  'Center
      BorderStyle     =   1  'Fixed Single
      Caption         =   "Warning - use at your own risk!"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   12
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   735
      Left            =   7080
      TabIndex        =   2
      Top             =   120
      Width           =   2295
   End
   Begin VB.Label Label3 
      Alignment       =   2  'Center
      Caption         =   $"FileEditor.frx":08CA
      Height          =   855
      Left            =   1440
      TabIndex        =   12
      Top             =   5880
      Width           =   6615
   End
End
Attribute VB_Name = "FileEditor"
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.

Private GenItem As MSComctlLib.ListItem
Option Explicit

Public Function GetName(RecordNum As Integer) As String
'This function returns the names of each record location
'in the session data files
Select Case RecordNum

'VH 3.0 options
Case 1: GetName = "Version"
Case 2: GetName = "Induction File"
Case 3: GetName = "Deepener File"
Case 4: GetName = "Suggestions File"
Case 5: GetName = "Wakener File"
Case 6: GetName = "Video File"
Case 7: GetName = "Character"
Case 8: GetName = "Subliminals File"
Case 9: GetName = "Audio File"
Case 10: GetName = "Engine Name"
Case 11: GetName = "TTS ModeID"
Case 12: GetName = "Char Horizontal"
Case 13: GetName = "Char Vertical"
Case 14: GetName = "Enable Subliminals"
Case 15: GetName = "Monotone"
Case 16: GetName = "Whisper"
Case 17: GetName = "Enable Video"
Case 18: GetName = "Enable Character"
Case 19: GetName = "Enable Induction"
Case 20: GetName = "Enable Deepener"
Case 21: GetName = "Enable Suggestions"
Case 22: GetName = "Enable Wakener"
Case 23: GetName = "Enable Audio"
Case 24: GetName = "Voice Pitch"
Case 25: GetName = "Voice Speed"
Case 26: GetName = "Voice Volume"
Case 27: GetName = "Character Zoom"
Case 28: GetName = "Video Zoom"
Case 29: GetName = "Session Type"
Case 30: GetName = "Start Type"
Case 31: GetName = "Start in Hours"
Case 32: GetName = "Start in Minutes"
Case 33: GetName = "Flash Quality"

'VH 3.1 options
Case 34: GetName = "Sub Cycle Time"
Case 35: GetName = "Sub Frequency"
Case 36: GetName = "Sub Inv (not used)"

'VH 3.2 options
Case 37: GetName = "TTS Voice Name"

'VH 4.0 options
Case 38: GetName = "Enable Binaurals"
Case 39: GetName = "Enable Flashers"
Case 40: GetName = "Old Binaural Freq 1"
Case 41: GetName = "Old Binaural Freq 2"
Case 42: GetName = "Binaural Tone Vol"
Case 43: GetName = "Binaural Balance"
Case 44: GetName = "Binaural Mask Vol"
Case 45: GetName = "Shape A Color 1"
Case 46: GetName = "Shape A Color 2"
Case 47: GetName = "Shape B Color 1"
Case 48: GetName = "Shape B Color 2"
Case 49: GetName = "Flasher Bar Width"
Case 50: GetName = "Scroll Up Window"
Case 51: GetName = "Session Name"
Case 52: GetName = "Session Author"
Case 53: GetName = "Session Comments"
Case 54: GetName = "Session Date"

'VH 4.2 options
Case 55: GetName = "Custom Vis Zoom"
Case 56: GetName = "Enable Custom Vis"
Case 57: GetName = "Tunnel (not used)"
Case 58: GetName = "CT Circle Size"
Case 59: GetName = "CT Circle Radius"
Case 60: GetName = "CT Circle Width"
Case 61: GetName = "Vis Timer Speed"
Case 62: GetName = "CT Reverse"
Case 63: GetName = "Spiral Thickness"
Case 64: GetName = "Spiral Zoom"
Case 65: GetName = "Screen Resolution"

'VH 4.3 options
Case 66: GetName = "Video Speed"
Case 67: GetName = "Audio Speed"

'VH 4.41 options
Case 68: GetName = "Flash Sub Text1"
Case 69: GetName = "Flash Sub Text2"
Case 70: GetName = "Flash Sub Text3"
Case 71: GetName = "Flash Sub Text4"
Case 72: GetName = "Flash Sub Text5"
Case 73: GetName = "Flash Sub Text6"
Case 74: GetName = "Flash Sub Text7"
Case 75: GetName = "Flash Sub Text8"
Case 76: GetName = "Flash Sub 1 On"
Case 77: GetName = "Flash Sub 2 On"
Case 78: GetName = "Flash Sub 3 On"
Case 79: GetName = "Flash Sub 4 On"
Case 80: GetName = "Flash Sub 5 On"
Case 81: GetName = "Flash Sub 6 On"
Case 82: GetName = "Flash Sub 7 On"
Case 83: GetName = "Flash Sub 8 On"
Case 84: GetName = "Message Speed"
Case 85: GetName = "Popup Text Color"
Case 86: GetName = "Popup Back Color"
Case 87: GetName = "Flash Text Color"
Case 88: GetName = "Flash Back Color"

'VH 4.5 options
Case 89: GetName = "Spiral Auto Clrs"
Case 90: GetName = "Spiral Width"
Case 91: GetName = "Spiral Height"
Case 92: GetName = "Spiral Limit"
Case 93: GetName = "Spiral Change"
Case 94: GetName = "Spiral Low Pos"
Case 95: GetName = "Spiral High Pos"
Case 96: GetName = "Spiral Pos Auto"
Case 97: GetName = "Spiral Pos User"
Case 98: GetName = "Spiral Pos Stop"
Case 99: GetName = "Spiral Inverse"
Case 100: GetName = "Spiral Loop"
Case 101: GetName = "Spiral Inv Loop"
Case 102: GetName = "Spiral Color"

'VH 5.0 options
Case 103: GetName = "Cust Audio File"
Case 104: GetName = "Background Volume"
Case 105: GetName = "Cust Audio Volume"
Case 106: GetName = "Video Volume"
Case 107: GetName = "Windowed Mode"
Case 108: GetName = "Window Horiz Size"
Case 109: GetName = "Window Vert Size"
Case 110: GetName = "Text-Only Session"
Case 111: GetName = "Text Color"
Case 112: GetName = "Text Back Color"
Case 113: GetName = "Text Font Name"
Case 114: GetName = "Text Size (not used)"
Case 115: GetName = "Text Bold"
Case 116: GetName = "Text Italic"
Case 117: GetName = "Message Duration"
Case 118: GetName = "3D Zoom (not used)"
Case 119: GetName = "3D Visual Type"
Case 120: GetName = "SAPI5 Voice Format"
Case 121: GetName = "Uses SAPI5"
Case 122: GetName = "Visual Mode #"
Case 123: GetName = "Cust Shape 1 Name"
Case 124: GetName = "CS 2 Name"
Case 125: GetName = "CS 3 Name"
Case 126: GetName = "CS 4 Name"
Case 127: GetName = "CS 5 Name"
Case 128: GetName = "CS 6 Name"
Case 129: GetName = "CS 7 Name"
Case 130: GetName = "CS 8 Name"
Case 131: GetName = "CS 9 Name"
Case 132: GetName = "CS 10 Name"
Case 133: GetName = "CS 1 Type"
Case 134: GetName = "CS 2 Type"
Case 135: GetName = "CS 3 Type"
Case 136: GetName = "CS 4 Type"
Case 137: GetName = "CS 5 Type"
Case 138: GetName = "CS 6 Type"
Case 139: GetName = "CS 7 Type"
Case 140: GetName = "CS 8 Type"
Case 141: GetName = "CS 9 Type"
Case 142: GetName = "CS 10 Type"
Case 143: GetName = "CS 1 DrawMode"
Case 144: GetName = "CS 2 DrawMode"
Case 145: GetName = "CS 3 DrawMode"
Case 146: GetName = "CS 4 DrawMode"
Case 147: GetName = "CS 5 DrawMode"
Case 148: GetName = "CS 6 DrawMode"
Case 149: GetName = "CS 7 DrawMode"
Case 150: GetName = "CS 8 DrawMode"
Case 151: GetName = "CS 9 DrawMode"
Case 152: GetName = "CS 10 DrawMode"
Case 153: GetName = "CS 1 BackStyle"
Case 154: GetName = "CS 2 BackStyle"
Case 155: GetName = "CS 3 BackStyle"
Case 156: GetName = "CS 4 BackStyle"
Case 157: GetName = "CS 5 BackStyle"
Case 158: GetName = "CS 6 BackStyle"
Case 159: GetName = "CS 7 BackStyle"
Case 160: GetName = "CS 8 BackStyle"
Case 161: GetName = "CS 9 BackStyle"
Case 162: GetName = "CS 10 BackStyle"
Case 163: GetName = "CS 1 BackColor"
Case 164: GetName = "CS 2 BackColor"
Case 165: GetName = "CS 3 BackColor"
Case 166: GetName = "CS 4 BackColor"
Case 167: GetName = "CS 5 BackColor"
Case 168: GetName = "CS 6 BackColor"
Case 169: GetName = "CS 7 BackColor"
Case 170: GetName = "CS 8 BackColor"
Case 171: GetName = "CS 9 BackColor"
Case 172: GetName = "CS 10 BackColor"
Case 173: GetName = "CS 1 FillStyle"
Case 174: GetName = "CS 2 FillStyle"
Case 175: GetName = "CS 3 FillStyle"
Case 176: GetName = "CS 4 FillStyle"
Case 177: GetName = "CS 5 FillStyle"
Case 178: GetName = "CS 6 FillStyle"
Case 179: GetName = "CS 7 FillStyle"
Case 180: GetName = "CS 8 FillStyle"
Case 181: GetName = "CS 9 FillStyle"
Case 182: GetName = "CS 10 FillStyle"
Case 183: GetName = "CS 1 FillColor"
Case 184: GetName = "CS 2 FillColor"
Case 185: GetName = "CS 3 FillColor"
Case 186: GetName = "CS 4 FillColor"
Case 187: GetName = "CS 5 FillColor"
Case 188: GetName = "CS 6 FillColor"
Case 189: GetName = "CS 7 FillColor"
Case 190: GetName = "CS 8 FillColor"
Case 191: GetName = "CS 9 FillColor"
Case 192: GetName = "CS 10 FillColor"
Case 193: GetName = "CS 1 BorderStyle"
Case 194: GetName = "CS 2 BorderStyle"
Case 195: GetName = "CS 3 BorderStyle"
Case 196: GetName = "CS 4 BorderStyle"
Case 197: GetName = "CS 5 BorderStyle"
Case 198: GetName = "CS 6 BorderStyle"
Case 199: GetName = "CS 7 BorderStyle"
Case 200: GetName = "CS 8 BorderStyle"
Case 201: GetName = "CS 9 BorderStyle"
Case 202: GetName = "CS 10 BorderStyle"
Case 203: GetName = "CS 1 BorderColor"
Case 204: GetName = "CS 2 BorderColor"
Case 205: GetName = "CS 3 BorderColor"
Case 206: GetName = "CS 4 BorderColor"
Case 207: GetName = "CS 5 BorderColor"
Case 208: GetName = "CS 6 BorderColor"
Case 209: GetName = "CS 7 BorderColor"
Case 210: GetName = "CS 8 BorderColor"
Case 211: GetName = "CS 9 BorderColor"
Case 212: GetName = "CS 10 BorderColor"
Case 213: GetName = "CS 1 BorderWidth"
Case 214: GetName = "CS 2 BorderWidth"
Case 215: GetName = "CS 3 BorderWidth"
Case 216: GetName = "CS 4 BorderWidth"
Case 217: GetName = "CS 5 BorderWidth"
Case 218: GetName = "CS 6 BorderWidth"
Case 219: GetName = "CS 7 BorderWidth"
Case 220: GetName = "CS 8 BorderWidth"
Case 221: GetName = "CS 9 BorderWidth"
Case 222: GetName = "CS 10 BorderWidth"
Case 223: GetName = "CS 1 VertPos"
Case 224: GetName = "CS 2 VertPos"
Case 225: GetName = "CS 3 VertPos"
Case 226: GetName = "CS 4 VertPos"
Case 227: GetName = "CS 5 VertPos"
Case 228: GetName = "CS 6 VertPos"
Case 229: GetName = "CS 7 VertPos"
Case 230: GetName = "CS 8 VertPos"
Case 231: GetName = "CS 9 VertPos"
Case 232: GetName = "CS 10 VertPos"
Case 233: GetName = "CS 1 HorizPos"
Case 234: GetName = "CS 2 HorizPos"
Case 235: GetName = "CS 3 HorizPos"
Case 236: GetName = "CS 4 HorizPos"
Case 237: GetName = "CS 5 HorizPos"
Case 238: GetName = "CS 6 HorizPos"
Case 239: GetName = "CS 7 HorizPos"
Case 240: GetName = "CS 8 HorizPos"
Case 241: GetName = "CS 9 HorizPos"
Case 242: GetName = "CS 10 HorizPos"
Case 243: GetName = "CS 1 Height"
Case 244: GetName = "CS 2 Height"
Case 245: GetName = "CS 3 Height"
Case 246: GetName = "CS 4 Height"
Case 247: GetName = "CS 5 Height"
Case 248: GetName = "CS 6 Height"
Case 249: GetName = "CS 7 Height"
Case 250: GetName = "CS 8 Height"
Case 251: GetName = "CS 9 Height"
Case 252: GetName = "CS 10 Height"
Case 253: GetName = "CS 1 Width"
Case 254: GetName = "CS 2 Width"
Case 255: GetName = "CS 3 Width"
Case 256: GetName = "CS 4 Width"
Case 257: GetName = "CS 5 Width"
Case 258: GetName = "CS 6 Width"
Case 259: GetName = "CS 7 Width"
Case 260: GetName = "CS 8 Width"
Case 261: GetName = "CS 9 Width"
Case 262: GetName = "CS 10 Width"
Case 263: GetName = "CS 1 Flash"
Case 264: GetName = "CS 2 Flash"
Case 265: GetName = "CS 3 Flash"
Case 266: GetName = "CS 4 Flash"
Case 267: GetName = "CS 5 Flash"
Case 268: GetName = "CS 6 Flash"
Case 269: GetName = "CS 7 Flash"
Case 270: GetName = "CS 8 Flash"
Case 271: GetName = "CS 9 Flash"
Case 272: GetName = "CS 10 Flash"
Case 273: GetName = "CS 1 ChangeShape"
Case 274: GetName = "CS 2 ChangeShape"
Case 275: GetName = "CS 3 ChangeShape"
Case 276: GetName = "CS 4 ChangeShape"
Case 277: GetName = "CS 5 ChangeShape"
Case 278: GetName = "CS 6 ChangeShape"
Case 279: GetName = "CS 7 ChangeShape"
Case 280: GetName = "CS 8 ChangeShape"
Case 281: GetName = "CS 9 ChangeShape"
Case 282: GetName = "CS 10 ChangeShape"
Case 283: GetName = "CS 1 ChangeColor"
Case 284: GetName = "CS 2 ChangeColor"
Case 285: GetName = "CS 3 ChangeColor"
Case 286: GetName = "CS 4 ChangeColor"
Case 287: GetName = "CS 5 ChangeColor"
Case 288: GetName = "CS 6 ChangeColor"
Case 289: GetName = "CS 7 ChangeColor"
Case 290: GetName = "CS 8 ChangeColor"
Case 291: GetName = "CS 9 ChangeColor"
Case 292: GetName = "CS 10 ChangeColor"
Case 293: GetName = "CS 1 FlashDuration"
Case 294: GetName = "CS 2 FlashDuration"
Case 295: GetName = "CS 3 FlashDuration"
Case 296: GetName = "CS 4 FlashDuration"
Case 297: GetName = "CS 5 FlashDuration"
Case 298: GetName = "CS 6 FlashDuration"
Case 299: GetName = "CS 7 FlashDuration"
Case 300: GetName = "CS 8 FlashDuration"
Case 301: GetName = "CS 9 FlashDuration"
Case 302: GetName = "CS 10 FlashDuration"
Case 303: GetName = "CS 1 ShapeDuration"
Case 304: GetName = "CS 2 ShapeDuration"
Case 305: GetName = "CS 3 ShapeDuration"
Case 306: GetName = "CS 4 ShapeDuration"
Case 307: GetName = "CS 5 ShapeDuration"
Case 308: GetName = "CS 6 ShapeDuration"
Case 309: GetName = "CS 7 ShapeDuration"
Case 310: GetName = "CS 8 ShapeDuration"
Case 311: GetName = "CS 9 ShapeDuration"
Case 312: GetName = "CS 10 ShapeDuration"
Case 313: GetName = "CS 1 ColorDuration"
Case 314: GetName = "CS 2 ColorDuration"
Case 315: GetName = "CS 3 ColorDuration"
Case 316: GetName = "CS 4 ColorDuration"
Case 317: GetName = "CS 5 ColorDuration"
Case 318: GetName = "CS 6 ColorDuration"
Case 319: GetName = "CS 7 ColorDuration"
Case 320: GetName = "CS 8 ColorDuration"
Case 321: GetName = "CS 9 ColorDuration"
Case 322: GetName = "CS 10 ColorDuration"
Case 323: GetName = "CS 1 AltShape"
Case 324: GetName = "CS 2 AltShape"
Case 325: GetName = "CS 3 AltShape"
Case 326: GetName = "CS 4 AltShape"
Case 327: GetName = "CS 5 AltShape"
Case 328: GetName = "CS 6 AltShape"
Case 329: GetName = "CS 7 AltShape"
Case 330: GetName = "CS 8 AltShape"
Case 331: GetName = "CS 9 AltShape"
Case 332: GetName = "CS 10 AltShape"
Case 333: GetName = "CS 1 AltColor"
Case 334: GetName = "CS 2 AltColor"
Case 335: GetName = "CS 3 AltColor"
Case 336: GetName = "CS 4 AltColor"
Case 337: GetName = "CS 5 AltColor"
Case 338: GetName = "CS 6 AltColor"
Case 339: GetName = "CS 7 AltColor"
Case 340: GetName = "CS 8 AltColor"
Case 341: GetName = "CS 9 AltColor"
Case 342: GetName = "CS 10 AltColor"
Case 343: GetName = "CS 1 ColorType"
Case 344: GetName = "CS 2 ColorType"
Case 345: GetName = "CS 3 ColorType"
Case 346: GetName = "CS 4 ColorType"
Case 347: GetName = "CS 5 ColorType"
Case 348: GetName = "CS 6 ColorType"
Case 349: GetName = "CS 7 ColorType"
Case 350: GetName = "CS 8 ColorType"
Case 351: GetName = "CS 9 ColorType"
Case 352: GetName = "CS 10 ColorType"

'VH 5.2 options
Case 353: GetName = "Text Duration"
Case 354: GetName = "Back Balance"
Case 355: GetName = "Custom Balance"
Case 356: GetName = "Video Balance"
Case 357: GetName = "Text Fade Speed"

'VH 5.3 options
Case 358: GetName = "Popup Sub Font"
Case 359: GetName = "Popup Sub Fontsize"
Case 360: GetName = "Popup Sub Fontbold"
Case 361: GetName = "Popup Sub Fontitalic"
Case 362: GetName = "Flash Sub Font"
Case 363: GetName = "Flash Sub Fontsize"
Case 364: GetName = "Flash Sub Fontbold"
Case 365: GetName = "Flash Sub Fontitalic"
Case 366: GetName = "Text Font Size"
Case 367: GetName = "Grock Color 1"
Case 368: GetName = "Grock Color 2"
Case 369: GetName = "Grock ColorMode"
Case 370: GetName = "Grock File"
Case 371: GetName = "Grock Shape Type"
Case 372: GetName = "Grock Num Shapes"
Case 373: GetName = "Grock Width"
Case 374: GetName = "Grock Offset"
Case 375: GetName = "Grock RadiusX"
Case 376: GetName = "Grock RadiusY"
Case 377: GetName = "Grock Fade"
Case 378: GetName = "Grock Font Name"
Case 379: GetName = "Grock Font Size"
Case 380: GetName = "Grock Font Bold"
Case 381: GetName = "Grock Font Italic"
Case 382: GetName = "Grock Font Color"
Case 383: GetName = "Grock Back Color"
Case 384: GetName = "Grock Frequency 1"
Case 385: GetName = "Grock Frequency 2"
Case 386: GetName = "Grock Duration"
Case 387: GetName = "Grock Enable Tones"
Case 388: GetName = "CT Color Multiplier"
Case 389: GetName = "CT Speed Red"
Case 390: GetName = "CT Speed Green"
Case 391: GetName = "CT Speed Blue"
Case 392: GetName = "CT Lock Colors"
Case 393: GetName = "CT Red Lower Bnd"
Case 394: GetName = "CT Green Lower Bnd"
Case 395: GetName = "CT Blue Lower Bnd"
Case 396: GetName = "CT Red Upper Bnd"
Case 397: GetName = "CT Green Upper Bnd"
Case 398: GetName = "CT Blue Upper Bnd"
Case 399: GetName = "Grock Tone Volume"

'VH 5.4 options
Case 400: GetName = "Num of Flashers"
Case 401: GetName = "Alternate Flashers"
Case 402: GetName = "Flasher Height"
Case 403: GetName = "Flasher Shape Type"
Case 404: GetName = "Grock Use SoundCard"

'VH 5.41 options
Case 405: GetName = "Use Flasher Rate"
Case 406: GetName = "Flasher Rate"

'VH 5.61 options
Case 407: GetName = "Loop Grock Text"
Case 408: GetName = "Enable Grock Text"

End Select
End Function

Public Function GetType(RecordNum As Integer) As Integer
'Returns the data type for the specified record

Select Case RecordNum

Case 1 To 11: GetType = vbString
Case 12 To 25: GetType = vbInteger
Case 26: GetType = vbLong
Case 27 To 36: GetType = vbInteger
Case 37: GetType = vbString
Case 38 To 39: GetType = vbInteger
Case 40 To 41: GetType = vbString
Case 42 To 44: GetType = vbInteger
Case 45 To 48: GetType = vbString
Case 49 To 50: GetType = vbInteger
Case 51 To 54: GetType = vbString
Case 55 To 56: GetType = vbInteger
Case 57: GetType = vbBoolean
Case 58: GetType = vbInteger
Case 59: GetType = vbSingle
Case 60 To 67: GetType = vbInteger
Case 68 To 75: GetType = vbString
Case 76 To 84: GetType = vbInteger
Case 85 To 88: GetType = vbString
Case 89 To 93: GetType = vbInteger
Case 94 To 95: GetType = vbString
Case 96 To 98: GetType = vbBoolean
Case 99 To 101: GetType = vbInteger
Case 102: GetType = vbLong
Case 103: GetType = vbString
Case 104 To 106: GetType = vbInteger
Case 107: GetType = vbBoolean
Case 108 To 109: GetType = vbString
Case 110: GetType = vbInteger
Case 111 To 112: GetType = vbLong
Case 113: GetType = vbString
Case 114: GetType = vbInteger
Case 115 To 116: GetType = vbBoolean
Case 117 To 119: GetType = vbInteger
Case 120: GetType = vbString
Case 121: GetType = vbBoolean
Case 122: GetType = vbInteger
Case 123 To 132: GetType = vbString
Case 133 To 162: GetType = vbInteger
Case 163 To 172: GetType = vbLong
Case 173 To 182: GetType = vbInteger
Case 183 To 192: GetType = vbLong
Case 193 To 202: GetType = vbInteger
Case 203 To 212: GetType = vbLong
Case 213 To 332: GetType = vbInteger
Case 333 To 342: GetType = vbLong
Case 343 To 352: GetType = vbInteger
Case 353 To 357: GetType = vbInteger
Case 358: GetType = vbString
Case 359: GetType = vbSingle
Case 360 To 361: GetType = vbBoolean
Case 362: GetType = vbString
Case 363: GetType = vbSingle
Case 364 To 365: GetType = vbBoolean
Case 366: GetType = vbSingle
Case 367 To 369: GetType = vbLong
Case 370: GetType = vbString
Case 371 To 372: GetType = vbInteger
Case 373 To 376: GetType = vbInteger
Case 377: GetType = vbBoolean
Case 378: GetType = vbString
Case 379: GetType = vbSingle
Case 380 To 381: GetType = vbBoolean
Case 382 To 386: GetType = vbLong
Case 387: GetType = vbBoolean
Case 388 To 406: GetType = vbInteger
Case 407 To 408: GetType = vbBoolean

End Select
End Function

Private Sub Command1_Click()
If ExceptionHandlers = True Then On Error GoTo ErrorHandler2
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
StartLoading:
If ExceptionHandlers = True Then On Error GoTo ErrorHandler
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

If ExceptionHandlers = True Then On Error GoTo ErrorHandler
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 ItemData As String
Dim TypeVal As String
Dim ReqVersion As String
Dim itmX As ListItem

ListView1.ListItems.Clear

Open CommonDialog1.Filename For Random As #1
I = 0
While (Not EOF(1) And I < Records + 1)
I = I + 1
If GetType(I) = vbString Then Get #1, I, TempString: ItemData = TempString: TypeVal = "String"
If GetType(I) = vbInteger Then Get #1, I, TempInt: ItemData = LTrim$(Str$(TempInt)): TypeVal = "Int"
If GetType(I) = vbBoolean Then
    Get #1, I, TempBool
    If TempBool = True Then ItemData = "True"
    If TempBool = False Then ItemData = "False"
    TypeVal = "Bool"
End If
If GetType(I) = vbSingle Then Get #1, I, TempSingle: ItemData = LTrim$(Str$(TempSingle)): TypeVal = "Single"
If GetType(I) = vbLong Then Get #1, I, TempLong: ItemData = LTrim$(Str$(TempLong)): TypeVal = "Long"

If I <= 408 Then ReqVersion = "5.61+"
If I <= 406 Then ReqVersion = "5.41+"
If I <= 404 Then ReqVersion = "5.4+"
If I <= 399 Then ReqVersion = "5.3+"
If I <= 357 Then ReqVersion = "5.2+"
If I <= 352 Then ReqVersion = "5.0+"
If I <= 102 Then ReqVersion = "4.5+"
If I <= 88 Then ReqVersion = "4.41+"
If I <= 67 Then ReqVersion = "4.3+"
If I <= 65 Then ReqVersion = "4.2+"
If I <= 54 Then ReqVersion = "4.0+"
If I <= 37 Then ReqVersion = "3.2+"
If I <= 36 Then ReqVersion = "3.1+"
If I <= 33 Then ReqVersion = "3.0+"

After:
Set itmX = ListView1.ListItems.Add(, , LTrim$(Str$(I)))
itmX.SubItems(1) = GetName(I)
itmX.SubItems(2) = ReqVersion
itmX.SubItems(3) = TypeVal
itmX.SubItems(4) = ItemData

Wend
Close #1

Exit Sub
ErrorHandler:
    Close #1
    err.Source = "File Editor - Command1"
    Call ErrorReport("An error occurred while loading the file.", vbExclamation)
Exit Sub
ErrorHandler2:
Exit Sub
End Sub

Private Sub Command2_Click()
Unload Me
End Sub

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

'Put new value into list
GenItem.SubItems(4) = Text1.Text

Dim pos As Integer
pos = Val(GenItem.Text)

'Store new value into file, with correct data type
Open CommonDialog1.Filename For Random As #1
If Check1.Value = 1 Then
    Put #1, pos, CStr(Text1.Text)
End If
If Check2.Value = 1 Then
    Put #1, pos, CInt(Text1.Text)
End If
If Check4.Value = 1 Then
    Put #1, pos, CBool(Text1.Text)
End If
If Check5.Value = 1 Then
    Put #1, pos, CSng(Text1.Text)
End If
If Check3.Value = 1 Then
    Put #1, pos, CLng(Text1.Text)
End If

Close #1

Exit Sub
ErrorHandler:
    Close #1
    err.Source = "File Editor - Command3"
    Call ErrorReport("An error occurred while saving the new value.", vbExclamation)

End Sub

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

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

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

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

Label3.Top = Me.Height - 1935
Label3.Left = (Me.Width / 2) - (Label3.Width) / 2
Command4.Left = (Me.Width / 2) - (Command4.Width / 2)
Command1.Left = Command4.Left - 1920
Command2.Left = Command4.Left + 1920

'Create Column Headers
ListView1.ColumnHeaders.Add , , "#", ListView1.Width / 16
ListView1.ColumnHeaders.Add , , "Data Item", ListView1.Width / 4
ListView1.ColumnHeaders.Add , , "Ver", ListView1.Width / 11
ListView1.ColumnHeaders.Add , , "Type", ListView1.Width / 10
ListView1.ColumnHeaders.Add , , "Value", ListView1.Width * 2

End Sub

Private Sub Form_Resize()
If Me.Width < 6800 Then Me.Width = 6800
If Me.Height < 7540 Then Me.Height = 7540
Command1.Top = Me.Height - 975
Command2.Top = Command1.Top
Command4.Top = Command1.Top

Label3.Top = Me.Height - 1935
Label3.Left = (Me.Width / 2) - (Label3.Width) / 2
Command4.Left = (Me.Width / 2) - (Command4.Width / 2)
Command1.Left = Command4.Left - 1920
Command2.Left = Command4.Left + 1920

ListView1.Width = Me.Width - 3060
ListView1.Height = Me.Height - 2400
Frame1.Left = Me.Width - 2715
Label4.Left = Me.Width - 2595

End Sub

Private Sub ListView1_ColumnClick(ByVal ColumnHeader As MSComctlLib.ColumnHeader)
'Sort list by column
ListView1.SortKey = ColumnHeader.Index - 1
ListView1.Sorted = True
End Sub

Private Sub ListView1_ItemClick(ByVal Item As MSComctlLib.ListItem)
'User has clicked a row

Set GenItem = Item

'Display item in column 5 (value)
Text1.Text = Item.SubItems(4)

Check1.Value = 0
Check2.Value = 0
Check3.Value = 0
Check4.Value = 0
Check5.Value = 0

'Select data type
If GetType(Int(Item.Text)) = vbString Then Check1.Value = 1
If GetType(Int(Item.Text)) = vbInteger Then Check2.Value = 1
If GetType(Int(Item.Text)) = vbLong Then Check3.Value = 1
If GetType(Int(Item.Text)) = vbBoolean Then Check4.Value = 1
If GetType(Int(Item.Text)) = vbSingle Then Check5.Value = 1

End Sub

Private Sub Timer1_Timer()
Label6.Caption = Len(Text1.Text)
End Sub
