VERSION 2.00
Begin Form frmT2W 
   BackColor       =   &H00C0C0C0&
   Caption         =   "Time To WIN (Demo)"
   ClientHeight    =   8115
   ClientLeft      =   1410
   ClientTop       =   705
   ClientWidth     =   9105
   Height          =   8460
   Icon            =   TIME2WIN.FRX:0000
   Left            =   1380
   LinkTopic       =   "Form1"
   ScaleHeight     =   8115
   ScaleWidth      =   9105
   Tag             =   "TIME2WIN"
   Top             =   390
   Width           =   9165
   Begin PictureBox Picture1 
      AutoSize        =   -1  'True
      BorderStyle     =   0  'None
      Height          =   480
      Left            =   8520
      Picture         =   TIME2WIN.FRX:0302
      ScaleHeight     =   480
      ScaleWidth      =   480
      TabIndex        =   10
      Top             =   180
      Visible         =   0   'False
      Width           =   480
   End
   Begin ComboBox Combo2 
      Height          =   300
      Left            =   6570
      TabIndex        =   2
      Top             =   450
      Width           =   1185
   End
   Begin TextBox Text1 
      Height          =   285
      Left            =   3150
      TabIndex        =   8
      Text            =   "Text1"
      Top             =   7740
      Width           =   5865
   End
   Begin Frame Frame1 
      BackColor       =   &H00C0C0C0&
      Height          =   1455
      Left            =   90
      TabIndex        =   6
      Top             =   6210
      Visible         =   0   'False
      Width           =   8925
      Begin ListBox List2 
         Height          =   1200
         Left            =   4590
         TabIndex        =   5
         Top             =   180
         Width           =   4155
      End
      Begin ListBox List1 
         Height          =   1200
         Left            =   180
         TabIndex        =   4
         Top             =   180
         Width           =   4155
      End
   End
   Begin CommandButton Command1 
      Caption         =   "&Start demo for the selected item"
      Height          =   285
      Left            =   90
      TabIndex        =   0
      Top             =   450
      Width           =   4065
   End
   Begin ComboBox Combo1 
      Height          =   300
      Left            =   90
      TabIndex        =   9
      Top             =   90
      Width           =   7665
   End
   Begin Label Label2 
      BackStyle       =   0  'Transparent
      Caption         =   "&Text for string manipulation"
      Height          =   195
      Left            =   90
      TabIndex        =   7
      Top             =   7785
      Width           =   2985
   End
   Begin Label Label1 
      BackStyle       =   0  'Transparent
      Caption         =   "&Iterations for speed test"
      Height          =   195
      Left            =   4320
      TabIndex        =   1
      Top             =   510
      Width           =   2175
   End
   Begin Label Label3 
      BackStyle       =   0  'Transparent
      BorderStyle     =   1  'Fixed Single
      Height          =   5340
      Left            =   90
      TabIndex        =   3
      Top             =   810
      Width           =   8925
      WordWrap        =   -1  'True
   End
Option Explicit
Option Base 1
Dim Item       As Integer
Dim ItemFile   As Integer
Dim ItemMean   As Integer
Const RandI = 32767
Const RandL = 2147483647
Const RandS = 1E+10!
Const RandD = 1E+16
Dim Tmp  As String
Sub Combo2_Click ()
   Item = Val(Combo2.Text)
   ItemFile = Val(Combo2.Text)
   ItemMean = Val(Combo2.Text)
End Sub
Sub Command1_Click ()
   Static Flag    As Integer
   If (Flag = True) Then Exit Sub
   frmT2W.Tag = cGetIn(cEXEnameActiveWindow(), ".", 1)
   cDisableFI Picture1
   Flag = True
   MousePointer = 11
   Frame1.Visible = False
   List1.Clear
   List2.Clear
   List1.FontBold = True
   List2.FontBold = True
   Label3.Caption = ""
   DoEvents
   Select Case Combo1.ListIndex
      Case 0
	 Frame1.Visible = True
	 Call TestAddI
      Case 1
	 Frame1.Visible = True
	 Call TestDeviationI
      Case 2
	 Frame1.Visible = True
	 Call TestFillI
      Case 3
	 Frame1.Visible = True
	 Call TestMaxI
      Case 4
	 Frame1.Visible = True
	 Call TestMeanI
      Case 5
	 Frame1.Visible = True
	 Call TestMinI
      Case 6
	 Frame1.Visible = True
	 Call TestSetI
      Case 7
	 Frame1.Visible = True
	 Call TestSumI
      Case 8
	 Frame1.Visible = True
	 Call TestSortI
      Case 9
	 Frame1.Visible = True
	 Call TestReverseSortI
      Case 10
	 Call TestAddTime
      Case 11
	 Call TestTimeBetween
      Case 12
	 Call TestCheckTime
      Case 13
	 Call TestHourTo
      Case 14
	 Call TestWindowsIni
      Case 15
	 Call TestWinINI1
      Case 16
	 Call TestWinINI2
      Case 17
	 Call TestWinINI3
      Case 18
	 Call TestAllSubDir
      Case 19
	 Call TestGetDriveCurrentDir
      Case 20
	 Call TestGetDefaultCurrentDir
      Case 21
	 Call TestChDir
      Case 22
	 Call TestCountFiles
      Case 23
	 Call TestCountDirectories
      Case 24
	 Call TestKillFiles
      Case 25
	 Call TestGetFullnameInEnv
      Case 26
	 Call TestGetDiskSpace
      Case 27
	 Call TestGetDiskUsed
      Case 28
	 Call TestGetDiskFree
      Case 29
	 Call TestKillDir
      Case 30
	 Call TestRenameFile
      Case 31
	 Call TestFileResetAllAttrib
      Case 32
	 Call TestFileSetAllAttrib
      Case 33
	 Call TestIsFileX
      Case 34
	 Call TestSubDirectory
      Case 35
	 Call TestUniqueFileName
      Case 36
	 Call TestIsX
      Case 37
	 Call TestOneCharFromLeft
      Case 38
	 Call TestOneCharFromRight
      Case 39
	 Call TestBlockCharFromLeft
      Case 40
	 Call TestBlockCharFromRight
      Case 41
	 Call TestCompact
      Case 42
	 Call TestUncompact
      Case 43
	 Call TestInsertChars
      Case 44
	 Call TestRemoveBlockChar
      Case 45
	 Call TestRemoveOneChar
      Case 46
	 Call TestCompressTab
      Case 47
	 Call TestExpandTab
      Case 48
	 Call TestGiveBitPalindrome
      Case 49
	 Call TestIsBitPalindrome
      Case 50
	 Call TestInsertBlocksBy
      Case 51
	 Call TestInsertBlocks
      Case 52
	 Call TestResizeStringAndFill
      Case 53
	 Call TestResizeString
      Case 54
	 Call TestFilterBlocks
      Case 55
	 Call TestFilterChars
      Case 56
	 Call TestCheckChars
      Case 57
	 Call TestChangeChars
      Case 58
	 Call TestChangeCharsUntil
      Case 59
	 Call TestReverse
      Case 60
	 Call TestGetIn
      Case 61
	 Call TestGetBlock
      Case 62
	 Call TestCreateAndFill
      Case 63
	 Call TestStringCRC32
      Case 64
	 Call TestCompress
      Case 65
	 Call TestEncrypt
      Case 66
	 Call TestDecrypt
      Case 67
	 Call TestFileCRC32
      Case 68
	 Call TestLrc
      Case 69
	 Call TestIsPalindrome
      Case 70
	 Call TestCheckNumericity
      Case 71
	 Call TestFill
      Case 72
	 Call TestSetAllBits
      Case 73
	 Call TestSetBit
      Case 74
	 Call TestGetBit
      Case 75
	 Call TestFindBitSet
      Case 76
	 Call TestFindBitReset
      Case 77
	 Call TestToggleBit
      Case 78
	 Call TestToggleAllBits
      Case 79
	 Call TestReverseAllBits
      Case 80
	 Call TestReverseAllBitsByChar
      Case 81
	 Call TestCreateBits
      Case 82
	 Call TestAtoR
      Case 83
	 Call TestRtoA
      Case 84
	 Call TestCustomControls
      Case 85
	 Call TestSwap
      Case 86
	 Call TestMin
      Case 87
	 Call TestMenuChange
      Case 88
	 Call TestFilesSize
      Case 89
	 Call TestClusterSize
      Case 90
	 Call TestAscTime
      Case 91
	 Call TestLanguage
      Case 92
	 Call TestReadLanguage
      Case 93
	 Call TestFileCmp
      Case 94
	 Call TestFileCopy
      Case 95
	 Call TestFileFilter
      Case 96
	 Call TestFileFilterNot
      Case 97
	 Call TestFileEncrypt
      Case 98
	 Call TestFileCompressTab
      Case 99
	 Call TestSplitPath
      Case 100
	 Call TestFullPath
      Case 101
	 Call TestMakePath
      Case 102
	 Call TestMsgBox
      Case 103
	 Call TestInpBox
      Case 104
	 Call TestMixChars
      Case 105
	 Call TestFileVersionInfo
      Case 106
	 Call TestFileVersion
      Case 107
	 Call TestFileLineCount
      Case 108
	 Call TestFileToX
      Case 109
	 Call TestBig
      Case 110
	 Call TestBigNum
      Case 111
	 Call TestSysMenuChange(LNG_FRENCH)
      Case 112
	 Call TestSysMenuChange(LNG_DUTCH)
      Case 113
	 Call TestSysMenuChange(LNG_GERMAN)
      Case 114
	 Call TestSysMenuChange(LNG_ENGLISH)
      Case 115
	 Call TestSysMenuChange(LNG_ITALIAN)
      Case 116
	 Call TestSysMenuChange(LNG_SPANISH)
      Case 117
	 Call TestFileMerge
      Case 118
	 Call TestFileSR
      Case 119
	 Call TestFileS
      Case 120
	 Call TestPatternMatch
      Case 121
	 Call TestPatternExtMatch
      Case 122
	 Call TestMorse
      Case 123
	 Call TestDriveType
      Case 124
	 Call TestBaseConversion
      Case 125
	 Call TestFileStatictics
      Case 126
	 Call TestDAStr(True)
      Case 127
	 Call TestDAL(True)
      Case 128
	 Call TestDAType(True)
      Case 129
	 Call TestDAStr(False)
      Case 130
	 Call TestDAL(False)
      Case 131
	 Call TestDAType(False)
      Case 132
	 Call TestDAStr(1)
      Case 133
	 Call TestDAL(1)
      Case 134
	 Call TestDAType(1)
      Case 135
	 Call TestDAStr(2)
      Case 136
	 Call TestDAL(2)
      Case 137
	 Call TestDAType(2)
      Case 138
	 Call TestDAStr(3)
      Case 139
	 Call TestDAL(3)
      Case 140
	 Call TestDAType(3)
      Case 141
	 Call TestDAStr(4)
      Case 142
	 Call TestDAL(4)
      Case 143
	 Call TestDAType(4)
      Case 144
	 Call TestDAStr(5)
      Case 145
	 Call TestDAL(5)
      Case 146
	 Call TestDAType(5)
      Case 147
	 Call TestDAStr(6)
      Case 148
	 Call TestDAL(6)
      Case 149
	 Call TestDAType(6)
      Case 150
	 Call TestCloseAllEditForm
      Case 151
	 Call TestHideAllEditForm
      Case 152
	 Call TestHideDebugForm
      Case 153
	 Call TestOrToken
      Case 154
	 Call TestAndToken
      Case 155
	 Call TestWalkThruWindow
      Case 156
	 Call TestSerial
      Case 157
	 Call TestTimer
      Case 158
	 Call TestAlign
      Case 159
	 Call TestToken
      Case 160
	 Call TestArrayOnDisk
      Case 161
	 Call TestArrayStringOnDisk
      Case 162
	 Call TestCnvAE
      Case 163
	 Call TestCombination
      Case 164
	 Frame1.Visible = True
	 Call TestFileSort(SORT_ASCENDING + SORT_CASE_SENSITIVE, False)
      Case 165
	 Frame1.Visible = True
	 Call TestFileSort(SORT_DESCENDING + SORT_CASE_SENSITIVE, False)
      Case 166
	 Frame1.Visible = True
	 Call TestFileSort(SORT_ASCENDING + SORT_CASE_INSENSITIVE, False)
      Case 167
	 Frame1.Visible = True
	 Call TestFileSort(SORT_DESCENDING + SORT_CASE_INSENSITIVE, False)
      Case 168
	 Frame1.Visible = True
	 Call TestFileSort(SORT_ASCENDING + SORT_CASE_SENSITIVE, True)
      Case 169
	 Frame1.Visible = True
	 Call TestFileSort(SORT_DESCENDING + SORT_CASE_SENSITIVE, True)
      Case 170
	 Frame1.Visible = True
	 Call TestFileSort(SORT_ASCENDING + SORT_CASE_INSENSITIVE, True)
      Case 171
	 Frame1.Visible = True
	 Call TestFileSort(SORT_DESCENDING + SORT_CASE_INSENSITIVE, True)
      Case 172
	 Call TestRegistrationKey
      Case 173
	 Call TestMD5
      Case 174
	 Call TestProperName
      Case 175
	 Call TestMatrixAdd
      Case 176
	 Call TestMatrixSub
      Case 177
	 Call TestMatrixCopy
      Case 178
	 Call TestMatrixMul
      Case 179
	 Call TestMatrixTranspose
      Case 180
	 Call TestMatrixCompare
      Case 181
	 Call Test2D
      Case 182
	 Call Test3D
      Case 183
	 Call TestProperName2
      Case 184
	 Call TestDOSMediaID
      Case 185
	 Call TestFileCompress
      Case 186
	 Call TestStringCompress
      Case 187
	 Frame1.Visible = True
	 Call TestFillIncrI
      Case 188
	 Call TestMatrixDet
      Case 189
	 Call TestMatrixInv
      Case 190
	 Call TestMatrixMinCo
      Case 191
	 Call TestMatrixSymToeplitz
      Case 192
	 Call TestFloppyInfo
      Case 193
	 Call TestDOSGetVolLabel
      Case 194
	 Call TestAddTwoTimes
      Case 195
	 Call TestMDA(True)
      Case 196
	 Call TestMDA(False)
      Case 197
	 Call TestMDA(1)
      Case 198
	 Call TestMDA(2)
      Case 199
	 Call TestMDA(3)
      Case 200
	 Call TestMDA(4)
      Case 201
	 Call TestMDA(5)
      Case 202
	 Call TestMDA(6)
      Case 203
	 Call TestDate
      Case 204
	 Call TestVersion
      Case 205
	 Call TestGetInR
      Case 206
	 Call TestBigString01
      Case 207
	 Call TestHMAStr(True)
      Case 208
	 Call TestHMAL(True)
      Case 209
	 Call TestHMAType(True)
      Case 210
	 Call TestHMAStr(1)
      Case 211
	 Call TestHMAL(1)
      Case 212
	 Call TestHMAType(1)
      Case 213
	 Call TestHMAStr(2)
      Case 214
	 Call TestHMAL(2)
      Case 215
	 Call TestHMAType(2)
      Case 216
	 Call TestHMAStr(3)
      Case 217
	 Call TestHMAL(3)
      Case 218
	 Call TestHMAType(3)
      Case 219
	 Call TestHMAStr(4)
      Case 220
	 Call TestHMAL(4)
      Case 221
	 Call TestHMAType(4)
      Case 222
	 Call TestHMAStr(5)
      Case 223
	 Call TestHMAL(5)
      Case 224
	 Call TestHMAType(5)
      Case 225
	 Call TestHMAStr(6)
      Case 226
	 Call TestHMAL(6)
      Case 227
	 Call TestHMAType(6)
      Case 228
	 Frame1.Visible = True
	 Call TestArrayLB
      Case 229
	 Call TestTime
      Case 230
	 Call TestControl3D
      Case 231
	 Call TestFileChangeChars
      Case 232
	 Call TestFilesInfoInDir
      Case 233
	 Call TestRcsCountFileDir
      Case 234
	 Frame1.Visible = True
	 Call TestFilesInDirOnDisk
      Case 235
	 Frame1.Visible = True
	 Call TestFilesInDirToArray
      Case 236
	 Call TestRcsFilesSize
      Case 237
	 Call TestMnuLanguage
      Case 238
	 Call TestSpellMoney
      Case 239
	 Call TestFraction
      Case 240
	 Call TestRndX
      Case 241
	 Call TestStringSAR
      Case 242
	 Call TestTruncatePath
      Case 243
	 Call TestSysMenuChange(LNG_CATALAN)
	 Call TestLanguage
	 SendKeys "% "
      Case 244
	 Call TestSysMenuChange(LNG_POLISH)
	 Call TestLanguage
	 SendKeys "% "
      Case 245
	 Frame1.Visible = True
	 Call TestCountI
      Case 246
	 Frame1.Visible = True
	 Call TestSearchI
      Case 247
	 Call TestFileUUCP
      Case 248
	 Call TestGZIP
      Case 249
	 Call TestGZIPStringCompress
      Case 250
	 Call TestKillDirs
      Case 251
	 Call TestRUBYencrypt(RUBY_MODE_MINIMUM)
      Case 252
	 Call TestRUBYencryptFile(RUBY_MODE_MINIMUM)
      Case 253
	 Call TestRUBYencrypt(RUBY_MODE_PORTABLE_SAFE)
      Case 254
	 Call TestRUBYencryptFile(RUBY_MODE_PORTABLE_SAFE)
      Case 255
	 Call TestRUBYencrypt(RUBY_MODE_FORT_KNOX)
      Case 256
	 Call TestRUBYencryptFile(RUBY_MODE_FORT_KNOX)
      Case 257
	 Call TestSysMenuChange(LNG_NORVEGIAN)
	 Call TestLanguage
	 SendKeys "% "
      Case 258
	 Call TestGetBitValue
      Case 259
	 Call TestSetBitValue
      Case 260
	 Call TestB2I
      Case 261
	 Call TestToHexa
      Case 262
	 Call TestToZ9
   End Select
   MousePointer = 0
   Flag = False
   cEnableFI Picture1
End Sub
Sub CreateFile ()
   Dim j       As Integer
   j = cFileResetAllAttrib("TEST.DAT")
   Close #1
   Open "TEST.DAT" For Output As #1
   Print #1, "This is a file test for time2win.dll"
   Print #1, "This is a file test for time2win.dll"
   Print #1, "This is a file test for time2win.dll"
   Print #1, "This is a file test for time2win.dll"
   Print #1, "This is a file test for time2win.dll"
   Print #1, "This is a file test for time2win.dll"
   Print #1, "This is a file test for time2win.dll"
   Close #1
   j = cFileResetAllAttrib("TEST.DAT")
End Sub
Sub DefCnv ()
   Dim i       As Integer
   Dim j       As Integer
   Dim Tmp     As String
   Close #1
   Open "c:\tmp\tmp1.Tmp" For Input Shared As #1
   Close #2
   Open "c:\tmp\tmp.Tmp" For Output Shared As #2
   i = 0
   While Not EOF(1)
      Line Input #1, Tmp
      i = i + 1
      Tmp = cCompress(Tmp)
      Print #2, Tab(10); cGetIn(Tmp, "@", 1);
      Print #2, Tab(60); "@" & i
   Wend
   Close #1
   Close #2
End Sub
Sub Form_DblClick ()
   'Call FileProcessTest
End Sub
Sub Form_Load ()
   Combo2.AddItem "1"
   Combo2.AddItem "5"
   Combo2.AddItem "10"
   Combo2.AddItem "50"
   Combo2.AddItem "100"
   Combo2.AddItem "500"
   Combo2.AddItem "1000"
   Combo2.AddItem "5000"
   Combo1.AddItem "Array routines : Add"
   Combo1.AddItem "Array routines : Deviation"
   Combo1.AddItem "Array routines : Fill"
   Combo1.AddItem "Array routines : Max"
   Combo1.AddItem "Array routines : Mean"
   Combo1.AddItem "Array routines : Min"
   Combo1.AddItem "Array routines : Set"
   Combo1.AddItem "Array routines : Sum"
   Combo1.AddItem "Array routines : Sort"
   Combo1.AddItem "Array routines : ReverseSort"
   Combo1.AddItem "Time routines : AddTime"
   Combo1.AddItem "Time routines : TimeBetween"
   Combo1.AddItem "Time routines : CheckTime"
   Combo1.AddItem "Time routines : HourTo"
   Combo1.AddItem "WIN.INI routines : some separators"
   Combo1.AddItem "WIN.INI routines : devices"
   Combo1.AddItem "WIN.INI routines : printerports"
   Combo1.AddItem "WIN.INI routines : winsection (windows section)"
   Combo1.AddItem "Files routines : AllSubDirectories"
   Combo1.AddItem "Files routines : GetDriveCurrentDir"
   Combo1.AddItem "Files routines : GetDefaultCurrentDir"
   Combo1.AddItem "Files routines : ChDir"
   Combo1.AddItem "Files routines : CountFiles"
   Combo1.AddItem "Files routines : CountDirectories"
   Combo1.AddItem "Files routines : KillFiles"
   Combo1.AddItem "Files routines : GetFullnameInEnv"
   Combo1.AddItem "Files routines : GetDiskSpace"
   Combo1.AddItem "Files routines : GetDiskUsed"
   Combo1.AddItem "Files routines : GetDiskFree"
   Combo1.AddItem "Files routines : KillDir"
   Combo1.AddItem "Files routines : RenameFile"
   Combo1.AddItem "Files routines : FileResetAllAttrib"
   Combo1.AddItem "Files routines : FileSetAllAttrib"
   Combo1.AddItem "Files routines : IsFileX"
   Combo1.AddItem "Files routines : SubDirectory"
   Combo1.AddItem "Files routines : UniqueFileName"
   Combo1.AddItem "String routines : IsX"
   Combo1.AddItem "String routines : OneCharFromLeft"
   Combo1.AddItem "String routines : OneCharFromRight"
   Combo1.AddItem "String routines : BlockCharFromLeft"
   Combo1.AddItem "String routines : BlockCharFromRight"
   Combo1.AddItem "String routines : Compact"
   Combo1.AddItem "String routines : Uncompact"
   Combo1.AddItem "String routines : InsertChars"
   Combo1.AddItem "String routines : RemoveBlockChar"
   Combo1.AddItem "String routines : RemoveOneChar"
   Combo1.AddItem "String routines : CompressTab"
   Combo1.AddItem "String routines : ExpandTab"
   Combo1.AddItem "String routines : GiveBitPalindrome"
   Combo1.AddItem "String routines : IsBitPalindrome"
   Combo1.AddItem "String routines : InsertBlocksBy"
   Combo1.AddItem "String routines : InsertBlocks"
   Combo1.AddItem "String routines : ResizeStringAndFill"
   Combo1.AddItem "String routines : ResizeString"
   Combo1.AddItem "String routines : FilterBlocks"
   Combo1.AddItem "String routines : FilterChars"
   Combo1.AddItem "String routines : CheckChars"
   Combo1.AddItem "String routines : ChangeChars"
   Combo1.AddItem "String routines : ChangeCharsUntil"
   Combo1.AddItem "String routines : Reverse"
   Combo1.AddItem "String routines : GetIn"
   Combo1.AddItem "String routines : GetBlock"
   Combo1.AddItem "String routines : CreateAndFill"
   Combo1.AddItem "String routines : StringCRC32"
   Combo1.AddItem "String routines : Compress"
   Combo1.AddItem "String routines : Encrypt"
   Combo1.AddItem "String routines : Decrypt"
   Combo1.AddItem "Files  routines : FileCRC32"
   Combo1.AddItem "String routines : Lrc"
   Combo1.AddItem "String routines : IsPalindrome"
   Combo1.AddItem "String routines : CheckNumericity"
   Combo1.AddItem "String routines : Fill"
   Combo1.AddItem "String routines : SetAllBits"
   Combo1.AddItem "String routines : SetBit"
   Combo1.AddItem "String routines : GetBit"
   Combo1.AddItem "String routines : FindBitSet"
   Combo1.AddItem "String routines : FindBitReset"
   Combo1.AddItem "String routines : ToggleBit"
   Combo1.AddItem "String routines : ToggleAllBits"
   Combo1.AddItem "String routines : ReverseAllBits"
   Combo1.AddItem "String routines : ReverseAllBitsByChar"
   Combo1.AddItem "String routines : CreateBits"
   Combo1.AddItem "String routines : ArabicToRoman"
   Combo1.AddItem "String routines : RomanToArabic"
   Combo1.AddItem "Custom controls"
   Combo1.AddItem "Swap routines"
   Combo1.AddItem "Min,Max routines"
   Combo1.AddItem "System menu change : French"
   Combo1.AddItem "Files routines : FilesSize, FilesSizeOnDisk, FilesSlack"
   Combo1.AddItem "Files routines : GetClusterSize"
   Combo1.AddItem "Language routines : GetAscTime"
   Combo1.AddItem "Language routines : Days and months name"
   Combo1.AddItem "Language routines : Read Control Language"
   Combo1.AddItem "File routines : Compare"
   Combo1.AddItem "File routines : File Copy"
   Combo1.AddItem "File routines : File Filter"
   Combo1.AddItem "File routines : File Filter Not"
   Combo1.AddItem "File routines : File Encrypt/Decrypt"
   Combo1.AddItem "File routines : File Compress/Expand Tab"
   Combo1.AddItem "File routines : SplitPath"
   Combo1.AddItem "File routines : FullPath"
   Combo1.AddItem "File routines : MakePath"
   Combo1.AddItem "Language routines : Multi-Language & TimeOut Message Box"
   Combo1.AddItem "Language routines : Multi-Language Input Box"
   Combo1.AddItem "String routines : MixChars"
   Combo1.AddItem "Windows Specific Routines : FileVersionInfo"
   Combo1.AddItem "Windows Specific Routines : FileVersion"
   Combo1.AddItem "File routines : FileLineCount"
   Combo1.AddItem "File routines : FileToLower/FileToUpper"
   Combo1.AddItem "Misc. routines : Big Double"
   Combo1.AddItem "Misc. routines : Big Numbers"
   Combo1.AddItem "System menu change (one call) : French"
   Combo1.AddItem "System menu change (one call) : Dutch"
   Combo1.AddItem "System menu change (one call) : German"
   Combo1.AddItem "System menu change (one call) : English"
   Combo1.AddItem "System menu change (one call) : Italian"
   Combo1.AddItem "System menu change (one call) : Spanish"
   Combo1.AddItem "File routines : FileMerge"
   Combo1.AddItem "File routines : FileSearchAndReplace"
   Combo1.AddItem "File routines : FileSearch, FileSearchCount"
   Combo1.AddItem "String routines : PatternMatch"
   Combo1.AddItem "String routines : PatternExtMatch"
   Combo1.AddItem "Misc. routines : Morse"
   Combo1.AddItem "DOS routines : GetDriveType"
   Combo1.AddItem "Misc. routines : Base conversion"
   Combo1.AddItem "File routines : FileStatistics"
   Combo1.AddItem "Disk Array routines : (create) String"
   Combo1.AddItem "Disk Array routines : (create) Long"
   Combo1.AddItem "Disk Array routines : (create) Type'd (b.e. : tagTASKENTRY)"
   Combo1.AddItem "Disk Array routines : (use) String"
   Combo1.AddItem "Disk Array routines : (use) Long"
   Combo1.AddItem "Disk Array routines : (use) Type'd (b.e. : tagTASKENTRY)"
   Combo1.AddItem "Disk Array routines : (clear) String"
   Combo1.AddItem "Disk Array routines : (clear) Long"
   Combo1.AddItem "Disk Array routines : (clear) Type'd (b.e. : tagTASKENTRY)"
   Combo1.AddItem "Disk Array routines : (clear sheet 2) String"
   Combo1.AddItem "Disk Array routines : (clear sheet 2) Long"
   Combo1.AddItem "Disk Array routines : (clear sheet 2) Type'd (b.e. : tagTASKENTRY)"
   Combo1.AddItem "Disk Array routines : (clear last row in sheet 1) String"
   Combo1.AddItem "Disk Array routines : (clear last row in sheet 1) Long"
   Combo1.AddItem "Disk Array routines : (clear last row in sheet 1) Type'd (b.e. : tagTASKENTRY)"
   Combo1.AddItem "Disk Array routines : (clear last col in sheet 1) String"
   Combo1.AddItem "Disk Array routines : (clear last col in sheet 1) Long"
   Combo1.AddItem "Disk Array routines : (clear last col in sheet 1) Type'd (b.e. : tagTASKENTRY)"
   Combo1.AddItem "Disk Array routines : (clear last row in all sheets) String"
   Combo1.AddItem "Disk Array routines : (clear last row in all sheets) Long"
   Combo1.AddItem "Disk Array routines : (clear last row in all sheets) Type'd (b.e. : tagTASKENTRY)"
   Combo1.AddItem "Disk Array routines : (clear last col in all sheets) String"
   Combo1.AddItem "Disk Array routines : (clear last col in all sheets) Long"
   Combo1.AddItem "Disk Array routines : (clear last col in all sheets) Type'd (b.e. : tagTASKENTRY)"
   Combo1.AddItem "VB Management routines : CloseAllEditForm"
   Combo1.AddItem "VB Management routines : HideAllEditForm, UnHideAllEditForm"
   Combo1.AddItem "VB Management routines : HideDebugForm, UnHideDebugForm"
   Combo1.AddItem "String routines : OrToken, OrTokenIn"
   Combo1.AddItem "String routines : AndToken, AndTokenIn"
   Combo1.AddItem "Windows Specific Routines : WalkThruWindow"
   Combo1.AddItem "Serialization : IsSerial, SerialGet, SerialPut, SerialInc"
   Combo1.AddItem "Timer functions : Extended Timer"
   Combo1.AddItem "String routines : Align"
   Combo1.AddItem "String routines : Token"
   Combo1.AddItem "Array routines : ArrayOnDisk"
   Combo1.AddItem "Array routines : ArrayStringOnDisk"
   Combo1.AddItem "String routines : cCnvASCIItoEBCDIC, cCnvEBCDICtoASCII"
   Combo1.AddItem "Misc. routines : Combination C(n,m)"
   Combo1.AddItem "File routines : FileSort (ASC and CS) (record ended with cr/lf)"
   Combo1.AddItem "File routines : FileSort (DSC and CS) (record ended with cr/lf)"
   Combo1.AddItem "File routines : FileSort (ASC and NS) (record ended with cr/lf)"
   Combo1.AddItem "File routines : FileSort (DSC and NS) (record ended with cr/lf)"
   Combo1.AddItem "File routines : FileSort (ASC and CS) (record size 3)"
   Combo1.AddItem "File routines : FileSort (DSC and CS) (record size 3)"
   Combo1.AddItem "File routines : FileSort (ASC and NS) (record size 3)"
   Combo1.AddItem "File routines : FileSort (DSC and NS) (record size 3)"
   Combo1.AddItem "Misc. routines : RegistrationKey"
   Combo1.AddItem "Misc. routines : HashMD5"
   Combo1.AddItem "String routines : ProperName"
   Combo1.AddItem "Matrix routines : MatrixAdd"
   Combo1.AddItem "Matrix routines : MatrixSub"
   Combo1.AddItem "Matrix routines : MatrixCopy"
   Combo1.AddItem "Matrix routines : MatrixMul"
   Combo1.AddItem "Matrix routines : MatrixTranspose"
   Combo1.AddItem "Matrix routines : MatrixCompare"
   Combo1.AddItem "2-D geometry"
   Combo1.AddItem "3-D geometry"
   Combo1.AddItem "String routines : ProperName2"
   Combo1.AddItem "DOS routines : DOSMediaID"
   Combo1.AddItem "File routines : File Compress/Expand"
   Combo1.AddItem "String routines : String Compress/Expand"
   Combo1.AddItem "Array routines : FillIncrI"
   Combo1.AddItem "Matrix routines : MatrixDet"
   Combo1.AddItem "Matrix routines : MatrixInv"
   Combo1.AddItem "Matrix routines : MatrixMinor,MatrixCoFactor"
   Combo1.AddItem "Matrix routines : MatrixSymToeplitz"
   Combo1.AddItem "DOS routines : FloppyInfo"
   Combo1.AddItem "DOS routines : DOSGetVolumeLabel"
   Combo1.AddItem "Time routines : AddTwoTimes"
   Combo1.AddItem "Multiple Disk Array routines : (create)"
   Combo1.AddItem "Multiple Disk Array routines : (use)"
   Combo1.AddItem "Multiple Disk Array routines : (clear)"
   Combo1.AddItem "Multiple Disk Array routines : (clear sheet 2)"
   Combo1.AddItem "Multiple Disk Array routines : (clear last row in sheet 1)"
   Combo1.AddItem "Multiple Disk Array routines : (clear last col in sheet 1)"
   Combo1.AddItem "Multiple Disk Array routines : (clear last row in all sheets)"
   Combo1.AddItem "Multiple Disk Array routines : (clear last col in all sheets)"
   Combo1.AddItem "Date routines : DayOfWeek, DayOfYear, WeekOfYear, ..."
   Combo1.AddItem "Misc. routines : GetVersion"
   Combo1.AddItem "String routines : GetInR, GetInPart, GetInPartR"
   Combo1.AddItem "Huge String"
   Combo1.AddItem "Huge Memory Array : (create) String"
   Combo1.AddItem "Huge Memory Array : (create) Long"
   Combo1.AddItem "Huge Memory Array : (create) Type'd (b.e. : tagTASKENTRY)"
   Combo1.AddItem "Huge Memory Array : (clear) String"
   Combo1.AddItem "Huge Memory Array : (clear) Long"
   Combo1.AddItem "Huge Memory Array : (clear) Type'd (b.e. : tagTASKENTRY)"
   Combo1.AddItem "Huge Memory Array : (clear sheet 2) String"
   Combo1.AddItem "Huge Memory Array : (clear sheet 2) Long"
   Combo1.AddItem "Huge Memory Array : (clear sheet 2) Type'd (b.e. : tagTASKENTRY)"
   Combo1.AddItem "Huge Memory Array : (clear last row in sheet 1) String"
   Combo1.AddItem "Huge Memory Array : (clear last row in sheet 1) Long"
   Combo1.AddItem "Huge Memory Array : (clear last row in sheet 1) Type'd (b.e. : tagTASKENTRY)"
   Combo1.AddItem "Huge Memory Array : (clear last col in sheet 1) String"
   Combo1.AddItem "Huge Memory Array : (clear last col in sheet 1) Long"
   Combo1.AddItem "Huge Memory Array : (clear last col in sheet 1) Type'd (b.e. : tagTASKENTRY)"
   Combo1.AddItem "Huge Memory Array : (clear last row in all sheets) String"
   Combo1.AddItem "Huge Memory Array : (clear last row in all sheets) Long"
   Combo1.AddItem "Huge Memory Array : (clear last row in all sheets) Type'd (b.e. : tagTASKENTRY)"
   Combo1.AddItem "Huge Memory Array : (clear last col in all sheets) String"
   Combo1.AddItem "Huge Memory Array : (clear last col in all sheets) Long"
   Combo1.AddItem "Huge Memory Array : (clear last col in all sheets) Type'd (b.e. : tagTASKENTRY)"
   Combo1.AddItem "Array routines : ArrayToListBox"
   Combo1.AddItem "Time routines : TimeToScalar, ScalarToTime"
   Combo1.AddItem "3D routines : Ctl3D, 3D, GetCtlRect, GetCtlRectTwips"
   Combo1.AddItem "File routines : FileChangeChars"
   Combo1.AddItem "File routines : FilesInfoInDir"
   Combo1.AddItem "File routines : RcsCountFileDir"
   Combo1.AddItem "File routines : FilesInDirOnDisk"
   Combo1.AddItem "File routines : FilesInDirToArray"
   Combo1.AddItem "Files routines : rcsFilesSize, rcsFilesSizeOnDisk, rcsFilesSlack"
   Combo1.AddItem "Language routines : Read Menu Language"
   Combo1.AddItem "String routines : SpellMoney"
   Combo1.AddItem "Misc. routines : Fraction"
   Combo1.AddItem "Misc. routines : Rndx"
   Combo1.AddItem "String routines : StringSAR"
   Combo1.AddItem "File routines : TruncatePath"
   Combo1.AddItem "System menu change (one call) : Catalan"
   Combo1.AddItem "System menu change (one call) : Polish"
   Combo1.AddItem "Array routines : Count"
   Combo1.AddItem "Array routines : Search"
   Combo1.AddItem "File routines : FileUUCP"
   Combo1.AddItem "File routines : GZIP File Compress/Expand"
   Combo1.AddItem "String routines : GZIP String Compress/Expand"
   Combo1.AddItem "Files routines : KillDirs"
   Combo1.AddItem "String routines : RUBYencrypt - RUBYdecrypt (minimum)"
   Combo1.AddItem "File routines : RUBYencryptFile - RUBYdecryptFile (minimum)"
   Combo1.AddItem "String routines : RUBYencrypt - RUBYdecrypt (portable safe)"
   Combo1.AddItem "File routines : RUBYencryptFile - RUBYdecryptFile (portable safe)"
   Combo1.AddItem "String routines : RUBYencrypt - RUBYdecrypt (FORT KNOX)"
   Combo1.AddItem "File routines : RUBYencryptFile - RUBYdecryptFile (FORT KNOX)"
   Combo1.AddItem "System menu change (one call) : Norvegian"
   Combo1.AddItem "String routines : GetBitX (5 functions)"
   Combo1.AddItem "String routines : SetBitX (5 functions)"
   Combo1.AddItem "String routines : B2I/B2L/I2B/L2B"
   Combo1.AddItem "String routines : FromHexa/ToHexa"
   Combo1.AddItem "String routines : FromZ9/ToZ9"
   Combo1.ListIndex = Combo1.ListCount - 1
   Combo2.ListIndex = 2
   Item = Val(Combo2.Text)
   ItemFile = Val(Combo2.Text)
   ItemMean = Val(Combo2.Text)
   Text1.Text = "A/BC/DEF/GHIJ"
End Sub
Sub Form_Paint ()
   Dim i As Integer
   Dim n As Integer
   n = frmT2W.Controls.Count - 1
   For i = 0 To n
      If ((frmT2W.Controls(i).Visible = True) And (frmT2W.Controls(i).Enabled = True)) Then
	 Call c3D(frmT2W.Controls(i), 0, 0)
      End If
   Next i
End Sub
Sub Form_Unload (Cancel As Integer)
   Call cShowWindow(frmT2W.hWnd, 1, 125)
End Sub
Sub Label2_DblClick ()
   Dim i       As Integer
   Dim n       As Integer
   n = Combo1.ListCount - 1
   For i = 0 To n
      Combo1.ListIndex = i
      DoEvents
      Call Command1_Click
      DoEvents
   Next i
End Sub
Sub Test2D ()
   Dim Tmp1       As String
   Dim i          As Integer
   Dim j          As Integer
   Dim k          As Double
   Dim u          As tagVECTOR2
   Dim v          As tagVECTOR2
   Dim w          As tagVECTOR2
   u.x = 1
   u.y = 1
   v.x = 3
   v.y = 3
   Tmp1 = Tmp1 & "First vector (u) is (" & u.x & "," & u.y & ")" & Chr$(13) & Chr$(13)
   Tmp1 = Tmp1 & "Second vector (v) is (" & v.x & "," & v.y & ")" & Chr$(13) & Chr$(13)
   Call cV2Add(u, v, w)
   Tmp1 = Tmp1 & "Sum of (u)+(v) = (w) is (" & w.x & "," & w.y & ")" & Chr$(13) & Chr$(13)
   Call cV2Sub(u, v, w)
   Tmp1 = Tmp1 & "Sub of (u)-(v) = (w) is (" & w.x & "," & w.y & ")" & Chr$(13) & Chr$(13)
   Call cV2Mul(u, v, w)
   Tmp1 = Tmp1 & "Mul of (u).(v) = (w) is (" & w.x & "," & w.y & ")" & Chr$(13) & Chr$(13)
   k = cV2Dot(u, v)
   Tmp1 = Tmp1 & "Dot of (u),(v) is " & k & Chr$(13) & Chr$(13)
   k = cV2Length(v)
   Tmp1 = Tmp1 & "Length (v) is " & k & Chr$(13) & Chr$(13)
   k = cV2SegmentLength(u, v)
   Tmp1 = Tmp1 & "Segmented Length from (u) to (v) is " & k & Chr$(13) & Chr$(13)
   Call cV2Normalized(u)
   Tmp1 = Tmp1 & "Normalization of (u) is (" & u.x & "," & u.y & ")" & Chr$(13) & Chr$(13)
	      
   cStartBasisTimer
   For i = 1 To ItemFile
      Call cV2Add(u, v, w)
   Next i
   Tmp1 = Tmp1 & "speed for " & ItemFile & " = " & cReadBasisTimer() & " ms"
   Label3.Caption = Tmp1
End Sub
Sub Test3D ()
   Dim Tmp1       As String
   Dim i          As Integer
   Dim j          As Integer
   Dim k          As Double
   Dim u          As tagVECTOR3
   Dim v          As tagVECTOR3
   Dim w          As tagVECTOR3
   u.x = 1
   u.y = 1
   u.z = 1
   v.x = 3
   v.y = 3
   v.z = 3
   Tmp1 = Tmp1 & "First vector (u) is (" & u.x & "," & u.y & "," & u.z & ")" & Chr$(13) & Chr$(13)
   Tmp1 = Tmp1 & "Second vector (v) is (" & v.x & "," & v.y & "," & v.z & ")" & Chr$(13) & Chr$(13)
   Call cV3Add(u, v, w)
   Tmp1 = Tmp1 & "Sum of (u)+(v) = (w) is (" & w.x & "," & w.y & "," & w.z & ")" & Chr$(13) & Chr$(13)
   Call cV3Sub(u, v, w)
   Tmp1 = Tmp1 & "Sub of (u)-(v) = (w) is (" & w.x & "," & w.y & "," & w.z & ")" & Chr$(13) & Chr$(13)
   Call cV3Mul(u, v, w)
   Tmp1 = Tmp1 & "Mul of (u).(v) = (w) is (" & w.x & "," & w.y & ")" & Chr$(13) & Chr$(13)
   k = cV3Dot(u, v)
   Tmp1 = Tmp1 & "Dot of (u),(v) is " & k & Chr$(13) & Chr$(13)
   k = cV3Length(v)
   Tmp1 = Tmp1 & "Length (v) is " & k & Chr$(13) & Chr$(13)
   k = cV3SegmentLength(u, v)
   Tmp1 = Tmp1 & "Segmented Length from (u) to (v) is " & k & Chr$(13) & Chr$(13)
   Call cV3Normalized(u)
   Tmp1 = Tmp1 & "Normalization of (u) is (" & u.x & "," & u.y & "," & u.z & ")" & Chr$(13) & Chr$(13)
	      
   cStartBasisTimer
   For i = 1 To ItemFile
      Call cV3Add(u, v, w)
   Next i
   Tmp1 = Tmp1 & "speed for " & ItemFile & " = " & cReadBasisTimer() & " ms"
   Label3.Caption = Tmp1
End Sub
Sub TestAddI ()
   Dim title      As String
   Dim Tmp        As String
   Dim Tmp1       As String
   Dim Tmp2       As String
   Dim i          As Integer
   Dim j          As Integer
   Dim m          As Double
   ReDim array(ItemMean) As Integer
   Randomize Timer
   For i = LBound(array) To UBound(array)
      array(i) = 0
      List1.AddItem "" & array(i)
   Next i
   j = cAddI(array(), 10)
   For i = LBound(array) To UBound(array)
      List2.AddItem "" & array(i)
   Next i
   Tmp1 = Tmp1 & "Add 10 to element 1 of an integer array is : " & array(1) & Chr$(13) & Chr$(13)
   Tmp1 = Tmp1 & "Add 10 to element " & ItemMean & " of an integer array is : " & array(ItemMean) & Chr$(13) & Chr$(13)
   cStartBasisTimer
   For i = 1 To ItemFile
      j = cAddI(array(), 1)
   Next i
   Tmp1 = Tmp1 & "speed for " & ItemFile & " = " & cReadBasisTimer() & " ms"
   Label3.Caption = Tmp1
End Sub
Sub TestAddTime ()
   Dim title      As String
   Dim Tmp        As String
   Dim Tmp1       As String
   Dim Tmp2       As String
   Dim i          As Integer
   Dim j          As Integer
   Tmp1 = "The time 10:00 + 02:01 is " & cIntoHour(cAddTime(600 + 121)) & Chr$(13) & Chr$(13)
   Tmp1 = Tmp1 & "The time 23:58 + 01:02 is " & cIntoHour(cAddTime(1438 + 62)) & Chr$(13) & Chr$(13)
   cStartBasisTimer
   For i = 1 To Item
      j = cAddTime(1439 + 2)
   Next i
   Tmp1 = Tmp1 & "speed for " & Item & " = " & cReadBasisTimer() & " ms"
   Label3.Caption = Tmp1
End Sub
Sub TestAddTwoTimes ()
   Dim title      As String
   Dim Tmp        As String
   Dim Tmp1       As String
   Dim Tmp2       As String
   Dim i          As Integer
   Dim j          As Integer
   Tmp1 = "The time '10:00:58' + '02:01:02' is '" & cAddTwoTimes("10:00:58", "02:01:02") & "'" & Chr$(13) & Chr$(13)
   Tmp1 = Tmp1 & "The time '23:58:58' + '01:02:01' is '" & cAddTwoTimes("23:58:58", "01:02:01") & "'" & Chr$(13) & Chr$(13)
   cStartBasisTimer
   For i = 1 To Item
      Tmp2 = cAddTwoTimes("23:58:58", "01:02:01")
   Next i
   Tmp1 = Tmp1 & "speed for " & Item & " = " & cReadBasisTimer() & " ms"
   Label3.Caption = Tmp1
End Sub
Sub TestAlign ()
   Dim title      As String
   Dim Tmp        As String
   Dim Tmp1       As String
   Dim Tmp2       As String
   Dim i          As Integer
   Dim j          As Integer
   Tmp = "TIME TO WIN"
   title = "Left Align of [" & Tmp & "] is " & Chr$(13) & "'"
   Tmp1 = title & cAlign(Tmp, -1, 30) & "'" & Chr$(13) & Chr$(13)
   title = "Center Align of [" & Tmp & "] is " & Chr$(13) & "'"
   Tmp1 = Tmp1 & title & cAlign(Tmp, 0, 30) & "'" & Chr$(13) & Chr$(13)
   title = "Right Align of [" & Tmp & "] is " & Chr$(13) & "'"
   Tmp1 = Tmp1 & title & cAlign(Tmp, 1, 30) & "'" & Chr$(13) & Chr$(13)
   j = cTimerOpen()
   i = cTimerStart(j)
   For i = 1 To Item
      Tmp2 = cAlign(Tmp, 0, 30)
   Next i
   Tmp1 = Tmp1 & "speed for " & Item & " = " & cTimerRead(j) & " ms"
   i = cTimerClose(j)
   Label3.Caption = Tmp1
End Sub
Sub TestAllSubDir ()
   Dim n       As Integer
   Dim Tmp     As String
   n = -1
   Tmp = cAllSubDirectories("C:", n)
   Label3.Caption = "Directories founden on drive C are " & n & Chr$(13) & Tmp
End Sub
Sub TestAndToken ()
   Dim title      As String
   Dim Tmp        As String
   Dim Tmp1       As String
   Dim Tmp2       As String
   Dim i          As Integer
   Dim j          As Integer
   Tmp = "FOX|OVER|THE"
   Tmp2 = "THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG"
   Tmp1 = "All tokens '" & Tmp & "' in '" & Tmp2 & "' is " & IIf(cAndToken(Tmp2, Tmp), "ok", "ko") & Chr$(13) & Chr$(13)
   Tmp = "quick|jumps|the"
   Tmp2 = "THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG"
   Tmp1 = Tmp1 & "All tokens '" & Tmp & "' in '" & Tmp2 & "' is " & IIf(cAndToken(Tmp2, Tmp), "ok", "ko") & Chr$(13) & Chr$(13)
   Tmp = "FOX\OVER\THE"
   Tmp2 = "THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG"
   Tmp1 = Tmp1 & "All tokens '" & Tmp & "' in '" & Tmp2 & "' is " & IIf(cAndTokenIn(Tmp2, Tmp, "\"), "ok", "ko") & Chr$(13) & Chr$(13)
   Tmp = "quick\jumps\the"
   Tmp2 = "THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG"
   Tmp1 = Tmp1 & "All tokens '" & Tmp & "' in '" & Tmp2 & "' is " & IIf(cAndTokenIn(Tmp2, Tmp, "\"), "ok", "ko") & Chr$(13) & Chr$(13)
   Tmp = "FOX/OVER/THE"
   Tmp2 = "THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG"
   Tmp1 = Tmp1 & "All tokens '" & Tmp & "' in '" & Tmp2 & "' is " & IIf(cAndTokenIn(Tmp2, Tmp, "\"), "ok", "ko") & Chr$(13) & Chr$(13)
   Tmp = "quick\JUMPS\the"
   Tmp2 = "THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG"
   Tmp1 = Tmp1 & "All tokens '" & Tmp & "' in '" & Tmp2 & "' is " & IIf(cAndTokenIn(Tmp2, Tmp, "\"), "ok", "ko") & Chr$(13) & Chr$(13)
   Tmp = LCase$("quick\jumps\THE")
   Tmp2 = LCase$("THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG")
   Tmp1 = Tmp1 & "All tokens '" & Tmp & "' in '" & Tmp2 & "' is " & IIf(cAndTokenIn(Tmp2, Tmp, "\"), "ok", "ko") & Chr$(13) & Chr$(13)
   cStartBasisTimer
   For i = 1 To Item
      j = cAndToken(Tmp2, Tmp)
   Next i
   Tmp1 = Tmp1 & "speed for " & Item & " = " & cReadBasisTimer() & " ms"
   Label3.Caption = Tmp1
End Sub
Sub TestArrayLB ()
   Dim title      As String
   Dim Tmp        As String
   Dim Tmp1       As String
   Dim Tmp2       As String
   Dim i          As Long
   Dim j          As Long
   Dim n1         As Long
   Dim n2         As Long
   Dim m1         As Integer
   Dim m2         As Integer
   m1 = -99
   m2 = 99
   ReDim AD(m1 To m2)         As tagVARSTRING
   Randomize Timer
   ' initialization because we use ReDim without Global definition
   For i = m1 To m2
      If ((i Mod 2) = 0) Then
	 AD(i).Contents = Chr$(64 + Int(26 * Rnd)) + Chr$(64 + Int(26 * Rnd)) + Chr$(64 + Int(26 * Rnd))
      Else
	 AD(i).Contents = Chr$(64 + Int(26 * Rnd)) + Chr$(64 + Int(26 * Rnd)) + Chr$(64 + Int(26 * Rnd)) + Chr$(64 + Int(26 * Rnd))
      End If
   Next i
   Tmp1 = "Memory array (" & m1 & " To " & m2 & ") has been created and initialized." & Chr$(13)
   j = cArrayToListBox(List1.hWnd, AD())
   j = cArrayToListBox(List2.hWnd, AD())
   cStartBasisTimer
   For i = 1 To Item
      j = cArrayToListBox(List1.hWnd, AD())
   Next i
   Tmp1 = Tmp1 & "speed for " & Item & " = " & cReadBasisTimer() & " ms"
   Label3.Caption = Tmp1
End Sub
Sub TestArrayOnDisk ()
   Dim title      As String
   Dim Tmp        As String
   Dim Tmp1       As String
   Dim Tmp2       As String
   Dim i          As Long
   Dim j          As Long
   Dim n1         As Long
   Dim n2         As Long
   Dim m1         As Integer
   Dim m2         As Integer
   m1 = -9999
   m2 = 9999
   ReDim AD(m1 To m2, 0 To 1)   As Long
   Randomize Timer
   n1 = Int(1234567890 * Rnd)
   n2 = -Int(987654321 * Rnd)
   ' initialization because we use ReDim without Global definition
   For i = m1 To m2
      AD(i, 0) = n1
      AD(i, 1) = n2
   Next i
   Tmp = "test.dat"
   Tmp1 = "Memory array (" & m1 & " To " & m2 & ", 0 To 1) has been created and initialized." & Chr$(13)
   Tmp1 = Tmp1 + "File '" & Tmp & "' will be used." & Chr$(13)
   Tmp1 = Tmp1 + "Each (i,0) is init with '" & n1 & "'." & Chr$(13)
   Tmp1 = Tmp1 + "Each (i,1) is init with '" & n2 & "'." & Chr$(13) & Chr$(13)
   Tmp1 = Tmp1 + "AD(" & m1 & ", 0) is " & AD(m1, 0) & Chr$(13)
   Tmp1 = Tmp1 + "AD(" & m2 & ", 0) is " & AD(m2, 0) & Chr$(13)
   Tmp1 = Tmp1 + "AD(" & m1 & ", 1) is " & AD(m1, 1) & Chr$(13)
   Tmp1 = Tmp1 + "AD(" & m2 & ", 1) is " & AD(m2, 1) & Chr$(13) & Chr$(13)
   Tmp1 = Tmp1 + "Put array on disk is '" & cArrayOnDisk(Tmp, AD(), PUT_ARRAY_ON_DISK) & "' bytes." & Chr$(13) & Chr$(13)
   Tmp1 = Tmp1 + "Memory array (" & m1 & " To " & m2 & ", 0 To 1) has been zero'ed." & Chr$(13) & Chr$(13)
   For i = m1 To m2
      AD(i, 0) = 0
      AD(i, 1) = 0
   Next i
   Tmp1 = Tmp1 + "AD(" & m1 & ", 0) is " & AD(m1, 0) & Chr$(13)
   Tmp1 = Tmp1 + "AD(" & m2 & ", 0) is " & AD(m2, 0) & Chr$(13)
   Tmp1 = Tmp1 + "AD(" & m1 & ", 1) is " & AD(m1, 1) & Chr$(13)
   Tmp1 = Tmp1 + "AD(" & m2 & ", 1) is " & AD(m2, 1) & Chr$(13) & Chr$(13)
   Tmp1 = Tmp1 + "Get array on disk is '" & cArrayOnDisk(Tmp, AD(), GET_ARRAY_ON_DISK) & "' bytes." & Chr$(13) & Chr$(13)
   Tmp1 = Tmp1 + "AD(" & m1 & ", 0) is " & AD(m1, 0) & Chr$(13)
   Tmp1 = Tmp1 + "AD(" & m2 & ", 0) is " & AD(m2, 0) & Chr$(13)
   Tmp1 = Tmp1 + "AD(" & m1 & ", 1) is " & AD(m1, 1) & Chr$(13)
   Tmp1 = Tmp1 + "AD(" & m2 & ", 1) is " & AD(m2, 1) & Chr$(13) & Chr$(13)
   cStartBasisTimer
   For i = 1 To Item
      j = cArrayOnDisk(Tmp, AD(), GET_ARRAY_ON_DISK)
   Next i
   Tmp1 = Tmp1 & "speed for " & Item & " = " & cReadBasisTimer() & " ms"
   Label3.Caption = Tmp1
End Sub
Sub TestArrayStringOnDisk ()
   Dim title      As String
   Dim Tmp        As String
   Dim Tmp1       As String
   Dim Tmp2       As String
   Dim i          As Long
   Dim j          As Long
   Dim n1         As Long
   Dim n2         As Long
   Dim r          As Long
   Dim m1         As Integer
   Dim m2         As Integer
   m1 = -999
   m2 = 4000
   ReDim AD(m1 To m2)         As tagVARSTRING
   ' initialization because we use ReDim without Global definition
   For i = m1 To m2
      AD(i).Contents = Space$(256)
   Next i
   Randomize Timer
   Tmp = "c:\autoexec.bat"
   Tmp2 = "c:\autoexec.tab"
   Tmp1 = "Reading file '" & Tmp & "' into AD(" & m1 & " To " & m2 & ") is '" & cArrayStringOnDisk(Tmp, AD(), GET_ARRAY_ON_DISK, r) & "'" & Chr$(13)
   Tmp1 = Tmp1 & "   The 7 (on " & r & ") first lines in array are : " & Chr$(13) & Chr$(13)
   For i = 0 To 6
      Tmp1 = Tmp1 & AD(m1 + i).Contents & Chr$(13)
   Next i
   Tmp1 = Tmp1 & Chr$(13) & "Writing file '" & Tmp2 & "' from AD(" & m1 & " To " & m2 & ") is '" & cArrayStringOnDisk(Tmp2, AD(), PUT_ARRAY_ON_DISK, r) & "'" & Chr$(13) & Chr$(13)
   Tmp1 = Tmp1 & "Reading file '" & Tmp2 & "' into AD(" & m1 & " To " & m2 & ") is '" & cArrayStringOnDisk(Tmp2, AD(), GET_ARRAY_ON_DISK, r) & "'" & Chr$(13)
   Tmp1 = Tmp1 & "   The 7 (on " & r & ") first lines in array are : " & Chr$(13) & Chr$(13)
   For i = 0 To 6
      Tmp1 = Tmp1 & AD(m1 + i).Contents & Chr$(13)
   Next i
   cStartBasisTimer
   For i = 1 To Item
      j = cArrayStringOnDisk(Tmp, AD(), GET_ARRAY_ON_DISK, r)
   Next i
   Tmp1 = Tmp1 & Chr$(13) & "speed for " & Item & " = " & cReadBasisTimer() & " ms"
   Label3.Caption = Tmp1
End Sub
Sub TestAscTime ()
   Dim title      As String
   Dim Tmp        As String
   Dim Tmp1       As String
   Dim Tmp2       As String
   Dim i          As Integer
   Dim j          As Integer
   Dim k          As Long
   Dim ErrCode    As Integer
   Tmp1 = ""
   For i = LNG_FRENCH To LNG_NORVEGIAN
      Tmp1 = Tmp1 + cGetAscTime(i) & Chr$(13)
   Next i
   Tmp1 = Tmp1 + Chr$(13)
   cStartBasisTimer
   For i = 1 To Item
      Tmp = cGetAscTime(LNG_FRENCH)
   Next i
   Tmp1 = Tmp1 & "speed for " & Item & " = " & cReadBasisTimer() & " ms"
   Label3.Caption = Tmp1
End Sub
Sub TestAtoR ()
   Dim Tmp        As Integer
   Dim Tmp1       As String
   Tmp = Year(Int(Now))
   Tmp1 = Tmp & " in Roman is " & UCase$(cArabicToRoman(Tmp)) & Chr$(13)
   Tmp = Year(Int(Now)) - 1
   Tmp1 = Tmp1 & Tmp & " in Roman is " & UCase$(cArabicToRoman(Tmp)) & Chr$(13)
   Tmp = Year(Int(Now)) + 1
   Tmp1 = Tmp1 & Tmp & " in Roman is " & UCase$(cArabicToRoman(Tmp)) & Chr$(13)
   Label3.Caption = Tmp1
End Sub
Sub TestB2I ()
   Dim lngResult        As Long
   Dim intResult        As Integer
   Dim strResult        As String
   Dim strDisplay       As String
   Dim i                As Integer
   Dim i1               As String
   Dim i2               As String
   Dim l1               As String
   Dim l2               As String
   i1 = "1010101010101010"
   i2 = "0101010101010101"
   l1 = "10101010101010101010101010101010"
   l2 = "01010101010101010101010101010101"
   lngResult = 0
   strResult = ""
   strDisplay = ""
     
   strDisplay = strDisplay & "B2I of " & i1 & " is " & cB2I(i1) & Chr$(13)
   strDisplay = strDisplay & "B2I of " & i2 & " is " & cB2I(i2) & Chr$(13) & Chr$(13)
   strDisplay = strDisplay & "I2B of " & cB2I(i1) & " is " & cI2B(cB2I(i1)) & Chr$(13)
   strDisplay = strDisplay & "I2B of " & cB2I(i2) & " is " & cI2B(cB2I(i2)) & Chr$(13) & Chr$(13)
   strDisplay = strDisplay & "B2L of " & l1 & " is " & cB2L(l1) & Chr$(13)
   strDisplay = strDisplay & "B2L of " & l2 & " is " & cB2L(l2) & Chr$(13) & Chr$(13)
   strDisplay = strDisplay & "L2B of " & cB2L(l1) & " is " & cL2B(cB2L(l1)) & Chr$(13)
   strDisplay = strDisplay & "L2B of " & cB2L(l2) & " is " & cL2B(cB2L(l2)) & Chr$(13) & Chr$(13)
   'time the function
   cStartBasisTimer
   For i = 1 To Item
      intResult = cB2I("10101010")
   Next i
   strDisplay = strDisplay & "speed for " & Item & " = " & cReadBasisTimer() & " ms"
   Label3.Caption = strDisplay
End Sub
Sub TestBaseConversion ()
   Dim title      As String
   Dim Tmp        As String
   Dim Tmp1       As String
   Dim Tmp2       As String
   Dim i          As Integer
   Dim j          As Integer
   Dim k          As Long
   Dim ErrCode    As Integer
   Tmp1 = ""
   For i = 2 To 20
      Tmp1 = Tmp1 + "Convert '1234567' base 10 to base " & i & " is " & cBaseConversion("1234567", 10, i) & Chr$(13)
   Next i
   Tmp1 = Tmp1 + Chr$(13)
   cStartBasisTimer
   For i = 1 To Item
      Tmp = cBaseConversion("123456789", 10, 10)
   Next i
   Tmp1 = Tmp1 & "speed for " & Item & " = " & cReadBasisTimer() & " ms"
   Label3.Caption = Tmp1
End Sub
Sub TestBetween ()
   Dim title      As String
   Dim Tmp        As String
   Dim Tmp1       As String
   Dim Tmp2       As String
   Dim i          As Integer
   Dim j          As Integer
   Tmp1 = "601 is not between 720 and 840 => " & cBetween(601, 720, 840) & Chr$(13) & Chr$(13)
   Tmp1 = Tmp1 & "601 is between 540 and 602 => " & cBetween(601, 540, 602) & Chr$(13) & Chr$(13)
   Tmp1 = Tmp1 & "61 is between 61 and 62 => " & cBetween(61, 61, 62) & Chr$(13) & Chr$(13)
   cStartBasisTimer
   For i = 1 To Item
      j = cBetween(720, 0, 1439)
   Next i
   Tmp1 = Tmp1 & "speed for " & Item & " = " & cReadBasisTimer() & " ms"
   Label3.Caption = Tmp1
End Sub
Sub TestBig ()
   Dim title      As String
   Dim Tmp        As String
   Dim Tmp1       As String
   Dim Tmp2       As String
   Dim Tmp3       As String
   Dim i          As Integer
   Dim j          As Integer
   Dim m1         As Double
   Dim m2         As Double
   m1 = 123456789012345#
   m2 = 987654321098765#
   Tmp1 = Tmp1 & "Double     : Add '" & m1 & "' and '" & m2 & "' is '" & (m1 + m2) & "'" & Chr$(13)
   Tmp1 = Tmp1 & "Big Double : Add '" & m1 & "' and '" & m2 & "' is '" & cBigFmt(cBigAdd(cMKN(Str$(m1)), cMKN(Str$(m2))), 0) & "'" & Chr$(13)
   Tmp1 = Tmp1 & "Big Num    : Add '" & m1 & "' and '" & m2 & "' is '" & cBigNum(LTrim$(Str$(m1)), BIG_ADD, LTrim$(Str$(m2))) & "'" & Chr$(13) & Chr$(13)
   Tmp1 = Tmp1 & "Double     : Sub '" & m1 & "' and '" & m2 & "' is '" & (m1 - m2) & "'" & Chr$(13)
   Tmp1 = Tmp1 & "Big Double : Sub '" & m1 & "' and '" & m2 & "' is '" & cBigFmt(cBigSub(cMKN(Str$(m1)), cMKN(Str$(m2))), 0) & "'" & Chr$(13)
   Tmp1 = Tmp1 & "Big Num    : Sub '" & m1 & "' and '" & m2 & "' is '" & cBigNum(LTrim$(Str$(m1)), BIG_SUB, LTrim$(Str$(m2))) & "'" & Chr$(13) & Chr$(13)
   Tmp1 = Tmp1 & "Double     : Mul '" & m1 & "' and '" & m2 & "' is '" & (m1 * m2) & "'" & Chr$(13)
   Tmp1 = Tmp1 & "Big Double : Mul '" & m1 & "' and '" & m2 & "' is '" & cBigFmt(cBigMul(cMKN(Str$(m1)), cMKN(Str$(m2))), 0) & "'" & Chr$(13)
   Tmp1 = Tmp1 & "Big Num    : Mul '" & m1 & "' and '" & m2 & "' is '" & cBigNum(LTrim$(Str$(m1)), BIG_MUL, LTrim$(Str$(m2))) & "'" & Chr$(13) & Chr$(13)
   Tmp1 = Tmp1 & "Double     : Div '" & m1 & "' and '" & m2 & "' is '" & (m1 / m2) & "'" & Chr$(13)
   Tmp1 = Tmp1 & "Big Double : Div '" & m1 & "' and '" & m2 & "' is '" & cBigFmt(cBigDiv(cMKN(Str$(m1)), cMKN(Str$(m2))), 0) & "'" & Chr$(13) & Chr$(13)
   cStartBasisTimer
   For i = 1 To ItemFile
      Tmp3 = cBigAdd(cMKN(Str$(m1)), cMKN(Str$(m2)))
   Next i
   Tmp1 = Tmp1 & "speed for " & ItemFile & " = " & cReadBasisTimer() & " ms"
   Label3.Caption = Tmp1
End Sub
Sub TestBigNum ()
   Dim title      As String
   Dim Tmp        As String
   Dim Tmp1       As String
   Dim Tmp2       As String
   Dim Tmp3       As String
   Dim Tmp4       As String
   Dim i          As Integer
   Dim j          As Integer
   Dim m          As Double
   Tmp3 = "00001234567890123456789012345678901"
   Tmp4 = "00009876543210987654321098765432100"
   Tmp1 = Tmp1 & "X = " & Tmp3 & Chr$(13)
   Tmp1 = Tmp1 & "Y = " & Tmp4 & Chr$(13) & Chr$(13)
   Tmp = Tmp3
   Tmp2 = Tmp4
   Tmp1 = Tmp1 & "'(X) + (Y)' " & Space$(3) & " is '" & cBigNum(Tmp, BIG_ADD, Tmp2) & "'" & Chr$(13)
   Tmp = Tmp3
   Tmp2 = "-" & Tmp4
   Tmp1 = Tmp1 & "'(X) + (-Y)' " & Space$(3) & " is '" & cBigNum(Tmp, BIG_ADD, Tmp2) & "'" & Chr$(13)
   Tmp = "-" & Tmp3
   Tmp2 = Tmp4
   Tmp1 = Tmp1 & "'(-X) + (Y)' " & Space$(3) & " is '" & cBigNum(Tmp, BIG_ADD, Tmp2) & "'" & Chr$(13)
   Tmp = "-" & Tmp3
   Tmp2 = "-" & Tmp4
   Tmp1 = Tmp1 & "'(-X) + (-Y)' " & Space$(3) & " is '" & cBigNum(Tmp, BIG_ADD, Tmp2) & "'" & Chr$(13) & Chr$(13)
   Tmp = Tmp3
   Tmp2 = Tmp4
   Tmp1 = Tmp1 & "'(X) - (Y)' " & Space$(3) & " is '" & cBigNum(Tmp, BIG_SUB, Tmp2) & "'" & Chr$(13)
   Tmp = Tmp3
   Tmp2 = "-" & Tmp4
   Tmp1 = Tmp1 & "'(X) - (-Y)' " & Space$(3) & " is '" & cBigNum(Tmp, BIG_SUB, Tmp2) & "'" & Chr$(13)
   Tmp = "-" & Tmp3
   Tmp2 = Tmp4
   Tmp1 = Tmp1 & "'(-X) - (Y)' " & Space$(3) & " is '" & cBigNum(Tmp, BIG_SUB, Tmp2) & "'" & Chr$(13)
   Tmp = "-" & Tmp3
   Tmp2 = "-" & Tmp4
   Tmp1 = Tmp1 & "'(-X) - (-Y)' " & Space$(3) & " is '" & cBigNum(Tmp, BIG_SUB, Tmp2) & "'" & Chr$(13) & Chr$(13)
   Tmp = Tmp3
   Tmp2 = Tmp4
   Tmp1 = Tmp1 & "'(X) * (Y)' " & Space$(3) & " is '" & cBigNum(Tmp, BIG_MUL, Tmp2) & "'" & Chr$(13)
   Tmp = Tmp3
   Tmp2 = "-" & Tmp4
   Tmp1 = Tmp1 & "'(X) * (-Y)' " & Space$(3) & " is '" & cBigNum(Tmp, BIG_MUL, Tmp2) & "'" & Chr$(13)
   Tmp = "-" & Tmp3
   Tmp2 = Tmp4
   Tmp1 = Tmp1 & "'(-X) * (Y)' " & Space$(3) & " is '" & cBigNum(Tmp, BIG_MUL, Tmp2) & "'" & Chr$(13)
   Tmp = "-" & Tmp3
   Tmp2 = "-" & Tmp4
   Tmp1 = Tmp1 & "'(-X) * (-Y)' " & Space$(3) & " is '" & cBigNum(Tmp, BIG_MUL, Tmp2) & "'" & Chr$(13) & Chr$(13)
   cStartBasisTimer
   For i = 1 To ItemFile
      Tmp3 = cBigNum(Tmp, BIG_ADD, Tmp2)
   Next i
   Tmp1 = Tmp1 & "speed for " & ItemFile & " ADD = " & (cReadBasisTimer() / 1000) & Chr$(13)
   cStartBasisTimer
   For i = 1 To ItemFile
      Tmp3 = cBigNum(Tmp, BIG_SUB, Tmp2)
   Next i
   Tmp1 = Tmp1 & "speed for " & ItemFile & " SUB = " & (cReadBasisTimer() / 1000) & Chr$(13)
   cStartBasisTimer
   For i = 1 To ItemFile
      Tmp3 = cBigNum(Tmp, BIG_MUL, Tmp2)
   Next i
   Tmp1 = Tmp1 & "speed for " & ItemFile & " MUL = " & (cReadBasisTimer() / 1000)
   Label3.Caption = Tmp1
End Sub
Sub TestBigString01 ()
   Dim Tmp1       As String
   Dim m1         As Integer
   Dim p1         As Integer
   Tmp1 = "Create a big string of 512 Kb is "
   m1 = cHugeStrCreate(512 * 1024&)
   Tmp1 = Tmp1 & IIf(m1 <> 0, "OK", "ko") & " (" & m1 & ")" & Chr$(13)
   Tmp1 = Tmp1 & "Size (" & m1 & ") is " & cHugeStrSize(m1) & Chr$(13)
   Tmp1 = Tmp1 & "Memory Address (" & m1 & ") is " & cHugeStrAddress(m1) & Chr$(13)
   Tmp1 = Tmp1 & "Length (" & m1 & ") is " & cHugeStrLength(m1) & Chr$(13)
   Tmp1 = Tmp1 & "Add '1234567890' (" & m1 & ") is " & IIf(cHugeStrAdd(m1, "1234567890"), "OK", "ko") & Chr$(13)
   Tmp1 = Tmp1 & "Length (" & m1 & ") is " & cHugeStrLength(m1) & Chr$(13)
   Tmp1 = Tmp1 & "Pointer (" & m1 & ") is " & cHugeStrGetWP(m1) & Chr$(13)
   Tmp1 = Tmp1 & "Add 'This is a test' (" & m1 & ") is " & IIf(cHugeStrAdd(m1, "This is a test"), "OK", "ko") & Chr$(13)
   Tmp1 = Tmp1 & "Length (" & m1 & ") is " & cHugeStrLength(m1) & Chr$(13)
   Tmp1 = Tmp1 & "Pointer (" & m1 & ") is " & cHugeStrGetWP(m1) & Chr$(13)
   Tmp1 = Tmp1 & "Blocks (" & m1 & ") is " & cHugeStrBlocks(m1) & Chr$(13)
   Tmp1 = Tmp1 & "Read (" & m1 & ") is '" & cHugeStrRead(m1, 1) & "'" & Chr$(13)
   Tmp1 = Tmp1 & "Set pointer (" & m1 & ") to 7 is " & cHugeStrSetWP(m1, 7) & Chr$(13)
   Tmp1 = Tmp1 & "Add 'THIS IS A TEST' (" & m1 & ") is " & IIf(cHugeStrAdd(m1, "THIS IS A TEST"), "OK", "ko") & Chr$(13)
   Tmp1 = Tmp1 & "Length (" & m1 & ") is " & cHugeStrLength(m1) & Chr$(13)
   Tmp1 = Tmp1 & "Read (" & m1 & ") is '" & cHugeStrRead(m1, 1) & "'" & Chr$(13)
   Tmp1 = Tmp1 & "Append 'append one' (" & m1 & ") is " & IIf(cHugeStrAppend(m1, "append one"), "OK", "ko") & Chr$(13)
   Tmp1 = Tmp1 & "Append 'append two' (" & m1 & ") is " & IIf(cHugeStrAppend(m1, "append two"), "OK", "ko") & Chr$(13)
   Tmp1 = Tmp1 & "Length (" & m1 & ") is " & cHugeStrLength(m1) & Chr$(13)
   Tmp1 = Tmp1 & "Read (" & m1 & ") is '" & cHugeStrRead(m1, 1) & "'" & Chr$(13)
   Tmp1 = Tmp1 & "Set pointer (" & m1 & ") to " & cHugeStrLength(m1) & " is " & cHugeStrSetWP(m1, cHugeStrLength(m1)) & Chr$(13)
   Tmp1 = Tmp1 & "Add 'AZERTYUIOP' (" & m1 & ") is " & IIf(cHugeStrAdd(m1, "AZERTYUIOP"), "OK", "ko") & Chr$(13)
   Tmp1 = Tmp1 & "Length (" & m1 & ") is " & cHugeStrLength(m1) & Chr$(13)
   Tmp1 = Tmp1 & "Mid (" & m1 & ") is '" & cHugeStrMid(m1, 3, 10) & "'" & Chr$(13)
   Tmp1 = Tmp1 & "Read (" & m1 & ") is '" & cHugeStrRead(m1, 1) & "'" & Chr$(13)
   Tmp1 = Tmp1 & "Clear (" & m1 & ") is " & IIf(cHugeStrClear(m1), "OK", "ko") & Chr$(13)
   Tmp1 = Tmp1 & "Free a big string of 512 Kb is "
   p1 = cHugeStrFree(m1)
   Tmp1 = Tmp1 & IIf(p1 <> 0, "OK", "ko") & " (" & p1 & ")" & Chr$(13)
   Label3.Caption = Tmp1
End Sub
Sub TestBlockCharFromLeft ()
   Dim title      As String
   Dim Tmp        As String
   Dim Tmp1       As String
   Dim Tmp2       As String
   Dim i          As Integer
   Dim j          As Integer
   Tmp = Text1.Text
   title = "The 3,7,1 blocks from left of [" & Tmp & "] are " & Chr$(13) & Chr$(13)
   Tmp = Text1.Text
   Tmp1 = title & "3:" & cBlockCharFromLeft(Tmp, 3) & " | 7:" & cBlockCharFromLeft(Tmp, 7) & " | 1:" & cBlockCharFromLeft(Tmp, 1) & Chr$(13) & Chr$(13)
   cStartBasisTimer
   For i = 1 To Item
      Tmp2 = cBlockCharFromLeft(Tmp, 2)
   Next i
   Tmp1 = Tmp1 & "speed for " & Item & " = " & cReadBasisTimer() & " ms"
   Label3.Caption = Tmp1
End Sub
Sub TestBlockCharFromRight ()
   Dim title      As String
   Dim Tmp        As String
   Dim Tmp1       As String
   Dim Tmp2       As String
   Dim i          As Integer
   Dim j          As Integer
   Tmp = Text1.Text
   title = "The 3,7,1 blocks from right of [" & Tmp & "] are " & Chr$(13) & Chr$(13)
   Tmp = Text1.Text
   Tmp1 = title & "3:" & cBlockCharFromRight(Tmp, 3) & " | 7:" & cBlockCharFromRight(Tmp, 7) & " | 1:" & cBlockCharFromRight(Tmp, 1) & Chr$(13) & Chr$(13)
   cStartBasisTimer
   For i = 1 To Item
      Tmp2 = cBlockCharFromRight(Tmp, 2)
   Next i
   Tmp1 = Tmp1 & "speed for " & Item & " = " & cReadBasisTimer() & " ms"
   Label3.Caption = Tmp1
End Sub
Sub TestChangeChars ()
   Dim title      As String
   Dim Tmp        As String
   Dim Tmp1       As String
   Dim Tmp2       As String
   Dim i          As Integer
   Dim j          As Integer
   Tmp = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
   title = "Change 'AZM' into 'qyc' of [" & Tmp & "] is "
   Call cChangeChars(Tmp, "AZM", "qyc")
   Tmp1 = title & Tmp & Chr$(13) & Chr$(13)
   cStartBasisTimer
   For i = 1 To Item
      Call cChangeChars(Tmp, "AZM", "qyc")
   Next i
   Tmp1 = Tmp1 & "speed for " & Item & " = " & cReadBasisTimer() & " ms"
   Label3.Caption = Tmp1
End Sub
Sub TestChangeCharsUntil ()
   Dim title      As String
   Dim Tmp        As String
   Dim Tmp1       As String
   Dim Tmp2       As String
   Dim i          As Integer
   Dim j          As Integer
   Tmp = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
   title = "Change 'AZM' into 'qyc' of [" & Tmp & "] until 'N' is "
   Call cChangeCharsUntil(Tmp, "AZM", "qyc", "N")
   Tmp1 = title & Tmp & Chr$(13) & Chr$(13)
   cStartBasisTimer
   For i = 1 To Item
      Call cChangeCharsUntil(Tmp, "AZM", "qyc", "N")
   Next i
   Tmp1 = Tmp1 & "speed for " & Item & " = " & cReadBasisTimer() & " ms"
   Label3.Caption = Tmp1
End Sub
Sub TestChDir ()
   Dim title      As String
   Dim Tmp        As String
   Dim Tmp1       As String
   Dim Tmp2       As String
   Dim i          As Integer
   Dim j          As Integer
   Dim k          As Long
   Dim ErrCode    As Integer
   Tmp1 = ""
   For i = 1 To 26
      k = cChDir(Chr$(64 + i) & ":\")
      If (k = True) Then
	 Tmp1 = Tmp1 & "ChDir to \ on '" & Chr$(64 + i) & ":' is " & IIf(k = True, "succesfull", "not successfull") & Chr$(13)
      End If
   Next i
   Tmp1 = Tmp1 + Chr$(13)
   cStartBasisTimer
   For i = 1 To Item
      k = cChDir("C:\")
   Next i
   Tmp1 = Tmp1 & "speed for " & Item & " = " & cReadBasisTimer() & " ms"
   Label3.Caption = Tmp1
End Sub
Sub TestChDrive ()
   Dim title      As String
   Dim Tmp        As String
   Dim Tmp1       As String
   Dim Tmp2       As String
   Dim i          As Integer
   Dim j          As Integer
   Dim k          As Long
   Dim ErrCode    As Integer
   Tmp1 = ""
   For i = 1 To 26
      k = cChDrive(Chr$(64 + i))
      If (k = True) Then
	 Tmp1 = Tmp1 & "ChDrive on '" & Chr$(64 + i) & ":' is " & IIf(k = True, "succesfull", "not successfull") & Chr$(13)
      End If
   Next i
   Tmp1 = Tmp1 + Chr$(13)
   cStartBasisTimer
   For i = 1 To Item
      k = cChDrive("C")
   Next i
   Tmp1 = Tmp1 & "speed for " & Item & " = " & cReadBasisTimer() & " ms"
   Label3.Caption = Tmp1
End Sub
Sub TestCheckChars ()
   Dim title      As String
   Dim Tmp        As String
   Dim Tmp1       As String
   Dim Tmp2       As String
   Dim i          As Integer
   Dim j          As Integer
   Tmp = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
   title = "Check 'A','Z' in [" & Tmp & "] is "
   Tmp1 = title & IIf(cCheckChars(Tmp, "AZ"), "all present", "not all present") & Chr$(13) & Chr$(13)
   title = Tmp1 & "Check 'a','Z' in [" & Tmp & "] is "
   Tmp1 = title & IIf(cCheckChars(Tmp, "aZ"), "all present", "not all present") & Chr$(13) & Chr$(13)
   cStartBasisTimer
   For i = 1 To Item
      j = cCheckChars(Tmp, "AZ")
   Next i
   Tmp1 = Tmp1 & "speed for " & Item & " = " & cReadBasisTimer() & " ms"
   Label3.Caption = Tmp1
End Sub
Sub TestCheckNumericity ()
   Dim title      As String
   Dim Tmp        As String
   Dim Tmp1       As String
   Dim Tmp2       As String
   Dim i          As Integer
   Dim j          As Integer
   Tmp = Text1.Text
   title = "[" & Tmp & "] is "
   Tmp1 = title & IIf(cCheckNumericity(Tmp), "Numeric", " not Numeric") & Chr$(13) & Chr$(13)
   cStartBasisTimer
   For i = 1 To Item
      j = cCheckNumericity(Tmp)
   Next i
   Tmp1 = Tmp1 & "speed for " & Item & " = " & cReadBasisTimer() & " ms"
   Label3.Caption = Tmp1
End Sub
Sub TestCheckTime ()
   Dim title      As String
   Dim Tmp        As String
   Dim Tmp1       As String
   Dim Tmp2       As String
   Dim i          As Integer
   Dim j          As Integer
   Tmp1 = "10:01 is not between 12:00 and 14:00 => " & cCheckTime(601, 720, 840) & Chr$(13) & Chr$(13)
   Tmp1 = Tmp1 & "10:01 is between 09:00 and 10:02 => " & cCheckTime(601, 540, 602) & Chr$(13) & Chr$(13)
   Tmp1 = Tmp1 & "01:01 is between 23:58 and 02:45 => " & cCheckTime(61, 1438, 165) & Chr$(13) & Chr$(13)
   cStartBasisTimer
   For i = 1 To Item
      j = cCheckTime(720, 0, 1439)
   Next i
   Tmp1 = Tmp1 & "speed for " & Item & " = " & cReadBasisTimer() & " ms"
   Label3.Caption = Tmp1
End Sub
Sub TestCloseAllEditForm ()
   If (cCloseAllEditForm() = True) Then
      Label3.Caption = "CloseAllEditForm SUCCESS"
   Else
      Label3.Caption = "CloseAllEditForm FAIL"
   End If
End Sub
Sub TestClusterSize ()
   Dim title      As String
   Dim Tmp        As String
   Dim Tmp1       As String
   Dim Tmp2       As String
   Dim i          As Integer
   Dim j          As Integer
   Dim k          As Long
   Dim ErrCode    As Integer
   Tmp1 = ""
   For i = 1 To 26
      k = cGetDiskClusterSize(Chr$(64 + i))
      If (k <> True) Then
	 Tmp1 = Tmp1 & "DiskClusterSize for '" & Chr$(64 + i) & ":' is " & k & Chr$(13)
      End If
   Next i
   Tmp1 = Tmp1 + Chr$(13)
   cStartBasisTimer
   For i = 1 To Item
      k = cGetDiskClusterSize("C")
   Next i
   Tmp1 = Tmp1 & "speed for " & Item & " = " & cReadBasisTimer() & " ms"
   Label3.Caption = Tmp1
End Sub
Sub TestCnvAE ()
   Dim title      As String
   Dim Tmp        As String
   Dim Tmp1       As String
   Dim Tmp2       As String
   Dim i          As Integer
   Dim j          As Integer
   Tmp = Text1.Text
   title = "ASCII -> EBCDIC of '" & Tmp & "' is "
   Call cCnvASCIItoEBCDIC(Tmp)
   Tmp1 = title & Tmp & Chr$(13) & Chr$(13)
   title = "EBCDIC -> ASCII of '" & Tmp & "' is "
   Call cCnvEBCDICtoASCII(Tmp)
   Tmp1 = Tmp1 & title & Tmp & Chr$(13) & Chr$(13)
   cStartBasisTimer
   For i = 1 To Item
      Call cCnvASCIItoEBCDIC(Tmp)
   Next i
   Tmp1 = Tmp1 & "speed for " & Item & " = " & cReadBasisTimer() & " ms"
   Label3.Caption = Tmp1
End Sub
Sub TestCombination ()
   Dim title      As String
   Dim Tmp        As String
   Dim Tmp1       As String
   Dim Tmp2       As String
   Dim Tmp3       As String
   Dim i          As Integer
   Dim j          As Integer
   Dim m1         As Double
   Dim m2         As Double
   For i = 0 To 10
      Tmp1 = Tmp1 & "Combination C(42, " & i & ") is '" & cCombination(42, i) & "'" & Chr$(13)
   Next i
   Tmp1 = Tmp1 & Chr$(13)
   For i = 42 To 32 Step -1
      Tmp1 = Tmp1 & "Combination C(42, " & i & ") is '" & cCombination(42, i) & "'" & Chr$(13)
   Next i
   Tmp1 = Tmp1 & Chr$(13)
   cStartBasisTimer
   For i = 1 To ItemFile
      m1 = cCombination(42, 6)
   Next i
   Tmp1 = Tmp1 & "speed for " & ItemFile & " = " & cReadBasisTimer() & " ms"
   Label3.Caption = Tmp1
End Sub
Sub TestCompact ()
   Dim title      As String
   Dim Tmp        As String
   Dim Tmp1       As String
   Dim Tmp2       As String
   Dim i          As Integer
   Dim j          As Integer
   Tmp = "30313233343536373839"
   title = "Compact '" & Tmp & "' is "
   Tmp1 = title & cCompact(Tmp) & Chr$(13) & Chr$(13)
   cStartBasisTimer
   For i = 1 To Item
      Tmp2 = cCompact(Tmp)
   Next i
   Tmp1 = Tmp1 & "speed for " & Item & " = " & cReadBasisTimer() & " ms"
   Label3.Caption = Tmp1
End Sub
Sub TestCompress ()
   Dim title      As String
   Dim Tmp        As String
   Dim Tmp1       As String
   Dim Tmp2       As String
   Dim i          As Integer
   Dim j          As Integer
   Tmp1 = "A " & Chr$(9) & "BC  "
   Tmp = Tmp1
   title = "Filter chr(0),chr(9),chr(32) in [" & Tmp & "] is "
   Tmp1 = title & cCompress(Tmp) & Chr$(13) & Chr$(13)
   cStartBasisTimer
   For i = 1 To Item
      Tmp2 = cCompress(Tmp)
   Next i
   Tmp1 = Tmp1 & "speed for " & Item & " = " & cReadBasisTimer() & " ms"
   Label3.Caption = Tmp1
End Sub
Sub TestCompressTab ()
   Dim title      As String
   Dim Tmp        As String
   Dim Tmp1       As String
   Dim Tmp2       As String
   Dim i          As Integer
   Dim j          As Integer
   Tmp = "A      BC   DEF  GHIJ  "
   title = "Compress tab (3 chars) into [" & Tmp & "] is " & Chr$(13) & Chr$(13)
   Tmp1 = title & cCompressTab(Tmp, 3) & Chr$(13) & Chr$(13)
   Tmp = "A      BC   DEF  GHIJ  "
   title = "Compress tab (2 chars) into [" & Tmp & "] is " & Chr$(13) & Chr$(13)
   Tmp1 = Tmp1 & title & cCompressTab(Tmp, 2) & Chr$(13) & Chr$(13)
   cStartBasisTimer
   For i = 1 To Item
      Tmp2 = cCompressTab(Tmp, 3)
   Next i
   Tmp1 = Tmp1 & "speed for " & Item & " = " & cReadBasisTimer() & " ms"
   Label3.Caption = Tmp1
End Sub
Sub TestControl3D ()
   Dim i    As Integer
   Dim j    As Integer
   Dim r    As tagRECT
   Dim Tmp1 As String
   Call cGetCtlRect(Label3, r)
   Tmp1 = "Coordinates (in pixels) of this label are :" & Chr$(13) & Chr$(13)
   Tmp1 = Tmp1 & "Left : " & r.Left & Chr$(13)
   Tmp1 = Tmp1 & "Top : " & r.Top & Chr$(13)
   Tmp1 = Tmp1 & "Right : " & r.Right & Chr$(13)
   Tmp1 = Tmp1 & "Bottom : " & r.Bottom & Chr$(13) & Chr$(13)
   Call cGetCtlRectTwips(Label3, r)
   Tmp1 = Tmp1 & "Coordinates (in twips) of this label are :" & Chr$(13) & Chr$(13)
   Tmp1 = Tmp1 & "Left : " & r.Left & Chr$(13)
   Tmp1 = Tmp1 & "Top : " & r.Top & Chr$(13)
   Tmp1 = Tmp1 & "Right : " & r.Right & Chr$(13)
   Tmp1 = Tmp1 & "Bottom : " & r.Bottom & Chr$(13)
   Label3.Caption = Tmp1
   For i = 1 To 11
      c3D Label3, 0, 0
      DoEvents
      j = cSleep(140)
      c3D Label3, 1, 0
      DoEvents
      j = cSleep(140)
   Next i
End Sub
Sub TestCountDirectories ()
   Dim title      As String
   Dim Tmp        As String
   Dim Tmp1       As String
   Dim Tmp2       As String
   Dim i          As Integer
   Dim j          As Integer
   Dim k          As Integer
   Tmp1 = ""
   Tmp1 = Tmp1 & "Number of directories in C:\ is " & cCountDirectories("C:\*.*") & Chr$(13) & Chr$(13)
   Tmp1 = Tmp1 & "Number of directories in D:\ is " & cCountDirectories("D:\*.*") & Chr$(13) & Chr$(13)
   Tmp1 = Tmp1 & "Number of directories in E:\ is " & cCountDirectories("E:\*.*") & Chr$(13) & Chr$(13)
   cStartBasisTimer
   For i = 1 To 10
      k = cCountDirectories("C:\*.*")
   Next i
   Tmp1 = Tmp1 & "speed for " & 10 & " = " & cReadBasisTimer() & " ms"
   Label3.Caption = Tmp1
End Sub
Sub TestCountFiles ()
   Dim title      As String
   Dim Tmp        As String
   Dim Tmp1       As String
   Dim Tmp2       As String
   Dim i          As Integer
   Dim j          As Integer
   Dim k          As Integer
   Tmp1 = ""
   Tmp1 = Tmp1 & "Number of files in C:\ is " & cCountFiles("C:\*.*") & Chr$(13) & Chr$(13)
   Tmp1 = Tmp1 & "Number of files in D:\ is " & cCountFiles("D:\*.*") & Chr$(13) & Chr$(13)
   Tmp1 = Tmp1 & "Number of files in E:\ is " & cCountFiles("E:\*.*") & Chr$(13) & Chr$(13)
   cStartBasisTimer
   For i = 1 To 10
      k = cCountFiles("C:\*.*")
   Next i
   Tmp1 = Tmp1 & "speed for " & 10 & " = " & cReadBasisTimer() & " ms"
   Label3.Caption = Tmp1
End Sub
Sub TestCountI ()
   Dim title      As String
   Dim Tmp        As String
   Dim Tmp1       As String
   Dim Tmp2       As String
   Dim i          As Integer
   Dim j          As Integer
   Dim m          As Integer
   ReDim array(20) As Integer
   Call cRndInit(-1)
   For i = LBound(array) To UBound(array)
      array(i) = cRndI()
      List1.AddItem "" & array(i)
   Next i
   Tmp1 = Tmp1 & "Count '" & array(5) & "' is " & cCountI(array(), array(5)) & Chr$(13)
   Tmp1 = Tmp1 & "Count '" & array(10) & "' is " & cCountI(array(), array(10)) & Chr$(13)
   Tmp1 = Tmp1 & "Count '" & array(15) & "' is " & cCountI(array(), array(15)) & Chr$(13)
   Tmp1 = Tmp1 & "Count '" & array(20) & "' is " & cCountI(array(), array(20)) & Chr$(13)
   Tmp1 = Tmp1 & "Count '" & -1234 & "' is " & cCountI(array(), -1234) & Chr$(13)
   cStartBasisTimer
   For i = 1 To ItemFile
      j = cCountI(array(), array(1))
   Next i
   Tmp1 = Tmp1 & "speed for " & ItemFile & " = " & cReadBasisTimer() & " ms"
   Label3.Caption = Tmp1
End Sub
Sub TestCreateAndFill ()
   Dim title      As String
   Dim Tmp        As String
   Dim Tmp1       As String
   Dim Tmp2       As String
   Dim i          As Integer
   Dim j          As Integer
   Tmp = Text1.Text
   title = "Create and Fill a string of 40 chars with [" & Tmp & "] is "
   Tmp1 = title & cCreateAndFill(40, Tmp) & Chr$(13) & Chr$(13)
   cStartBasisTimer
   For i = 1 To Item
      Tmp2 = cCreateAndFill(40, Tmp)
   Next i
   Tmp1 = Tmp1 & "speed for " & Item & " = " & cReadBasisTimer() & " ms"
   Label3.Caption = Tmp1
End Sub
Sub TestCreateBits ()
   Dim title      As String
   Dim Tmp        As String
   Dim Tmp1       As String
   Dim Tmp2       As String
   Dim i          As Integer
   Dim j          As Integer
   Tmp = Text1.Text
   title = "Create a string for 1024 bits is "
   Tmp1 = title & Len(cCreateBits(1024)) & " bytes" & Chr$(13) & Chr$(13)
   cStartBasisTimer
   For i = 1 To Item
      Tmp2 = cCreateBits(1024)
   Next i
   Tmp1 = Tmp1 & "speed for " & Item & " = " & cReadBasisTimer() & " ms"
   Label3.Caption = Tmp1
End Sub
Sub TestCustomControls ()
   Dim i       As Integer
   Dim n       As Integer
   Dim Tmp1    As String
   n = frmT2W.Count - 1
   For i = 0 To n
      Tmp1 = Tmp1 + "Control name is '" & cGetCtlNameIndex(frmT2W.Controls(i)) & "'     Control Class is '" & cGetCtlClass(frmT2W.Controls(i)) & "'" + Chr$(13)
   Next i
   Label3.Caption = Tmp1
End Sub
Sub TestDAL (Management As Integer)
   Dim Tmp        As String
   Dim ErrCode    As Integer
   Dim DA         As tagDISKARRAY
   ErrCode = cMakeDir("c:\t2w_tmp")
   DA.nFilename = "c:\t2w_tmp\dalong.tmp"
   DA.nType = DA_LONG
   DA.nIsTyped = False
   DA.nRows = 100
   DA.nCols = 100
   DA.nSheets = 2
   Select Case Management
      Case True      'create
	 ErrCode = cDACreate(DA, True)
      Case False     'use
	 ErrCode = cDACreate(DA, False)
      Case 1         'clear all
	 ErrCode = cDACreate(DA, False)
	 If (ErrCode = -1) Then ErrCode = cDAClear(DA)
      Case 2         'clear sheet 2
	 ErrCode = cDACreate(DA, False)
	 If (ErrCode = -1) Then ErrCode = cDAClearSheet(DA, 2)
      Case 3         'clear last row
	 ErrCode = cDACreate(DA, False)
	 If (ErrCode = -1) Then ErrCode = cDAClearRow(DA, DA.nRows, 1)
      Case 4         'clear last col
	 ErrCode = cDACreate(DA, False)
	 If (ErrCode = -1) Then ErrCode = cDAClearCol(DA, DA.nCols, 1)
      Case 5         'clear last row in all sheets
	 ErrCode = cDACreate(DA, False)
	 If (ErrCode = -1) Then ErrCode = cDAClearRow(DA, DA.nRows, -1)
      Case 6         'clear last col in all sheets
	 ErrCode = cDACreate(DA, False)
	 If (ErrCode = -1) Then ErrCode = cDAClearCol(DA, DA.nCols, -1)
   End Select
   Tmp = Tmp & "ErrCode = " & ErrCode & Chr$(13) & Chr$(13)
   If (ErrCode = True) Then
      
      Tmp = Tmp & "DA.daSize       = " & DA.daSize & Chr$(13)
      Tmp = Tmp & "DA.Signature    = " & DA.Signature & Chr$(13)
      Tmp = Tmp & "DA.nFilename    = " & Trim$(DA.nFilename) & Chr$(13)
      Tmp = Tmp & "DA.nType        = " & DA.nType & Chr$(13)
      Tmp = Tmp & "DA.nIsTyped     = " & DA.nIsTyped & Chr$(13)
      Tmp = Tmp & "DA.nRows        = " & DA.nRows & Chr$(13)
      Tmp = Tmp & "DA.nCols        = " & DA.nCols & Chr$(13)
      Tmp = Tmp & "DA.nSheets      = " & DA.nSheets & Chr$(13)
      Tmp = Tmp & "DA.rHandle      = " & DA.rHandle & Chr$(13)
      Tmp = Tmp & "DA.rElementSize = " & DA.rElementSize & Chr$(13)
      Tmp = Tmp & "DA.rFileSize    = " & DA.rFileSize & Chr$(13)
      Tmp = Tmp & "DA.rParts       = " & DA.rParts & Chr$(13)
      Tmp = Tmp & "DA.rRemain      = " & DA.rRemain & Chr$(13)
      Tmp = Tmp & "DA.rSheetSize   = " & DA.rSheetSize & Chr$(13)
      Tmp = Tmp & "DA.rTime        = " & DA.rTime & Chr$(13) & Chr$(13)
      If (Management = True) Then
	 Call cDAPut(DA, 1, 1, 1, 12345)
	 Call cDAPut(DA, 1, DA.nCols, 1, 56789)
	 Call cDAPut(DA, DA.nRows, 1, 1, 54321)
	 Call cDAPut(DA, DA.nRows, DA.nCols, 1, 98765)
	 Call cDAPut(DA, 1, 1, 2, 12345678)
	 Call cDAPut(DA, 1, DA.nCols, 2, 34567890)
	 Call cDAPut(DA, DA.nRows, 1, 2, 123456789)
	 Call cDAPut(DA, DA.nRows, DA.nCols, 2, 987654321)
      End If
      Tmp = Tmp & "R:1  , C:1  , D:1, Value : " & cDAGet(DA, 1, 1, 1) & "   , time : " & DA.rTime & Chr$(13)
      Tmp = Tmp & "R:1  , C:" & DA.nCols & ", D:1, Value : " & cDAGet(DA, 1, DA.nCols, 1) & "   , time : " & DA.rTime & Chr$(13)
      Tmp = Tmp & "R:" & DA.nRows & ", C:1  , D:1, Value : " & cDAGet(DA, DA.nRows, 1, 1) & "   , time : " & DA.rTime & Chr$(13)
      Tmp = Tmp & "R:" & DA.nRows & ", C:" & DA.nCols & ", D:1, Value : " & cDAGet(DA, DA.nRows, DA.nCols, 1) & "   , time : " & DA.rTime & Chr$(13)
      Tmp = Tmp & "R:1  , C:1  , D:2, Value : " & cDAGet(DA, 1, 1, 2) & "   , time : " & DA.rTime & Chr$(13)
      Tmp = Tmp & "R:1  , C:" & DA.nCols & ", D:2, Value : " & cDAGet(DA, 1, DA.nCols, 2) & "   , time : " & DA.rTime & Chr$(13)
      Tmp = Tmp & "R:" & DA.nRows & ", C:1  , D:2, Value : " & cDAGet(DA, DA.nRows, 1, 2) & "   , time : " & DA.rTime & Chr$(13)
      Tmp = Tmp & "R:" & DA.nRows & ", C:" & DA.nCols & ", D:2, Value : " & cDAGet(DA, DA.nRows, DA.nCols, 2) & "   , time : " & DA.rTime & Chr$(13)
   End If
   Call cDAClose(DA, False)
   Label3.Caption = Tmp
End Sub
Sub TestDAStr (Management As Integer)
   Dim Tmp        As String
   Dim ErrCode    As Integer
   Dim DA         As tagDISKARRAY
   ErrCode = cMakeDir("c:\t2w_tmp")
   DA.nFilename = "c:\t2w_tmp\dastring.tmp"
   DA.nType = 50
   DA.nIsTyped = False
   DA.nRows = 100
   DA.nCols = 100
   DA.nSheets = 2
   Select Case Management
      Case True      'create
	 ErrCode = cDACreate(DA, True)
      Case False     'use
	 ErrCode = cDACreate(DA, False)
      Case 1         'clear all
	 ErrCode = cDACreate(DA, False)
	 If (ErrCode = -1) Then ErrCode = cDAClear(DA)
      Case 2         'clear sheet 2
	 ErrCode = cDACreate(DA, False)
	 If (ErrCode = -1) Then ErrCode = cDAClearSheet(DA, 2)
      Case 3         'clear last row
	 ErrCode = cDACreate(DA, False)
	 If (ErrCode = -1) Then ErrCode = cDAClearRow(DA, DA.nRows, 1)
      Case 4         'clear last col
	 ErrCode = cDACreate(DA, False)
	 If (ErrCode = -1) Then ErrCode = cDAClearCol(DA, DA.nCols, 1)
      Case 5         'clear last row in all sheets
	 ErrCode = cDACreate(DA, False)
	 If (ErrCode = -1) Then ErrCode = cDAClearRow(DA, DA.nRows, -1)
      Case 6         'clear last col in all sheets
	 ErrCode = cDACreate(DA, False)
	 If (ErrCode = -1) Then ErrCode = cDAClearCol(DA, DA.nCols, -1)
   End Select
   Tmp = Tmp & "ErrCode = " & ErrCode & Chr$(13) & Chr$(13)
   If (ErrCode = True) Then
      
      Tmp = Tmp & "DA.daSize       = " & DA.daSize & Chr$(13)
      Tmp = Tmp & "DA.Signature    = " & DA.Signature & Chr$(13)
      Tmp = Tmp & "DA.nFilename    = " & Trim$(DA.nFilename) & Chr$(13)
      Tmp = Tmp & "DA.nType        = " & DA.nType & Chr$(13)
      Tmp = Tmp & "DA.nIsTyped     = " & DA.nIsTyped & Chr$(13)
      Tmp = Tmp & "DA.nRows        = " & DA.nRows & Chr$(13)
      Tmp = Tmp & "DA.nCols        = " & DA.nCols & Chr$(13)
      Tmp = Tmp & "DA.nSheets      = " & DA.nSheets & Chr$(13)
      Tmp = Tmp & "DA.rHandle      = " & DA.rHandle & Chr$(13)
      Tmp = Tmp & "DA.rElementSize = " & DA.rElementSize & Chr$(13)
      Tmp = Tmp & "DA.rFileSize    = " & DA.rFileSize & Chr$(13)
      Tmp = Tmp & "DA.rParts       = " & DA.rParts & Chr$(13)
      Tmp = Tmp & "DA.rRemain      = " & DA.rRemain & Chr$(13)
      Tmp = Tmp & "DA.rSheetSize   = " & DA.rSheetSize & Chr$(13)
      Tmp = Tmp & "DA.rTime        = " & DA.rTime & Chr$(13) & Chr$(13)
      If (Management = True) Then
      
	 Call cDAPut(DA, 1, 1, 1, "D:1, ABCDEFGHIJ")
	 Call cDAPut(DA, 1, DA.nCols, 1, "D:1, abcdefghij")
	 Call cDAPut(DA, DA.nRows, 1, 1, "D:1, OPQRSTUVWXYZ")
	 Call cDAPut(DA, DA.nRows, DA.nCols, 1, "D:1, oprqstuvwxyz")
	 Call cDAPut(DA, 1, 1, 2, "D:2, 1234567890")
	 Call cDAPut(DA, 1, DA.nCols, 2, "D:2, 0987654321")
	 Call cDAPut(DA, DA.nRows, 1, 2, "D:2, 12345ABCDE")
	 Call cDAPut(DA, DA.nRows, DA.nCols, 2, "D:2, VWXYZ54321")
      End If
      Tmp = Tmp & "R:1  , C:1  , D:1, Value : " & Trim$(cDAGet(DA, 1, 1, 1)) & "   , time : " & DA.rTime & Chr$(13)
      Tmp = Tmp & "R:1  , C:" & DA.nCols & ", D:1, Value : " & Trim$(cDAGet(DA, 1, DA.nCols, 1)) & "   , time : " & DA.rTime & Chr$(13)
      Tmp = Tmp & "R:" & DA.nRows & ", C:1  , D:1, Value : " & Trim$(cDAGet(DA, DA.nRows, 1, 1)) & "   , time : " & DA.rTime & Chr$(13)
      Tmp = Tmp & "R:" & DA.nRows & ", C:" & DA.nCols & ", D:1, Value : " & Trim$(cDAGet(DA, DA.nRows, DA.nCols, 1)) & "   , time : " & DA.rTime & Chr$(13)
      Tmp = Tmp & "R:1  , C:1  , D:2, Value : " & Trim$(cDAGet(DA, 1, 1, 2)) & "   , time : " & DA.rTime & Chr$(13)
      Tmp = Tmp & "R:1  , C:" & DA.nCols & ", D:2, Value : " & Trim$(cDAGet(DA, 1, DA.nCols, 2)) & "   , time : " & DA.rTime & Chr$(13)
      Tmp = Tmp & "R:" & DA.nRows & ", C:1  , D:2, Value : " & Trim$(cDAGet(DA, DA.nRows, 1, 2)) & "   , time : " & DA.rTime & Chr$(13)
      Tmp = Tmp & "R:" & DA.nRows & ", C:" & DA.nCols & ", D:2, Value : " & Trim$(cDAGet(DA, DA.nRows, DA.nCols, 2)) & "   , time : " & DA.rTime & Chr$(13)
   End If
   Call cDAClose(DA, False)
   Label3.Caption = Tmp
End Sub
Sub TestDate ()
   Dim title      As String
   Dim Tmp        As String
   Dim Tmp1       As String
   Dim Tmp2       As String
   Dim i          As Integer
   Dim j          As Integer
   Dim nYear      As Integer
   Dim nMonth     As Integer
   Dim nDay       As Integer
   Dim nNow       As Long
   nNow = Int(Now)
   nYear = Year(nNow)
   nMonth = Month(nNow)
   nDay = Day(nNow)
   Tmp1 = "Today is the '" & Format$(Int(Now), "short date") & "'" & Chr$(13) & Chr$(13)
   Tmp1 = Tmp1 & "Day of the week (ISO, U.S., Special) is (" & cDayOfWeek(nYear, nMonth, nDay, True) & ", " & cDayOfWeek(nYear, nMonth, nDay, False) & ", " & cDayOfWeek(nYear, nMonth, nDay, 1) & ")" & Chr$(13) & Chr$(13)
   Tmp1 = Tmp1 & "Day of the year is '" & cDayOfYear(nYear, nMonth, nDay) & "'" & Chr$(13) & Chr$(13)
   Tmp1 = Tmp1 & "Week of the year (ISO, U.S., Special) is (" & cWeekOfYear(nYear, nMonth, nDay, True) & ", " & cWeekOfYear(nYear, nMonth, nDay, False) & ", " & cWeekOfYear(nYear, nMonth, nDay, 1) & ")" & Chr$(13) & Chr$(13)
   nNow = cDateToScalar(nYear, nMonth, nDay)
   Tmp1 = Tmp1 & "Scalar day is '" & nNow & "'" & Chr$(13)
   nYear = 0
   nMonth = 0
   nDay = 0
   Call cScalarToDate(nNow, nYear, nMonth, nDay)
   Tmp1 = Tmp1 & "Year : " & nYear & ", Month : " & nMonth & ", Day : " & nDay & Chr$(13) & Chr$(13) & Chr$(13)
   nNow = Int(Now)
   nYear = Year(nNow)
   nMonth = 1
   nDay = 1
   Tmp1 = Tmp1 & "First Day is the '" & Format$(DateSerial(nYear, nMonth, nDay), "short date") & "'" & Chr$(13) & Chr$(13)
   Tmp1 = Tmp1 & "Day of the week (ISO, U.S., Special) is (" & cDayOfWeek(nYear, nMonth, nDay, True) & ", " & cDayOfWeek(nYear, nMonth, nDay, False) & ", " & cDayOfWeek(nYear, nMonth, nDay, 1) & ")" & Chr$(13) & Chr$(13)
   Tmp1 = Tmp1 & "Day of the year is '" & cDayOfYear(nYear, nMonth, nDay) & "'" & Chr$(13) & Chr$(13)
   Tmp1 = Tmp1 & "Week of the year (ISO, U.S., Special) is (" & cWeekOfYear(nYear, nMonth, nDay, True) & ", " & cWeekOfYear(nYear, nMonth, nDay, False) & ", " & cWeekOfYear(nYear, nMonth, nDay, 1) & ")" & Chr$(13) & Chr$(13)
   nNow = cDateToScalar(nYear, nMonth, nDay)
   Tmp1 = Tmp1 & "Scalar day is '" & nNow & "'" & Chr$(13)
   nYear = 0
   nMonth = 0
   nDay = 0
   Call cScalarToDate(nNow, nYear, nMonth, nDay)
   Tmp1 = Tmp1 & "Year : " & nYear & ", Month : " & nMonth & ", Day : " & nDay & Chr$(13) & Chr$(13)
   Label3.Caption = Tmp1
End Sub
Sub TestDAType (Management As Integer)
   Dim Tmp        As String
   Dim ErrCode    As Integer
   Dim DA         As tagDISKARRAY
   Dim TE         As tagTASKENTRY
   ErrCode = cMakeDir("c:\t2w_tmp")
   DA.nFilename = "c:\t2w_tmp\datype.tmp"
   DA.nType = Len(TE)
   DA.nIsTyped = True
   DA.nRows = 100
   DA.nCols = 100
   DA.nSheets = 2
   Select Case Management
      Case True      'create
	 ErrCode = cDACreate(DA, True)
      Case False     'use
	 ErrCode = cDACreate(DA, False)
      Case 1         'clear all
	 ErrCode = cDACreate(DA, False)
	 If (ErrCode = -1) Then ErrCode = cDAClear(DA)
      Case 2         'clear sheet 2
	 ErrCode = cDACreate(DA, False)
	 If (ErrCode = -1) Then ErrCode = cDAClearSheet(DA, 2)
      Case 3         'clear last row
	 ErrCode = cDACreate(DA, False)
	 If (ErrCode = -1) Then ErrCode = cDAClearRow(DA, DA.nRows, 1)
      Case 4         'clear last col
	 ErrCode = cDACreate(DA, False)
	 If (ErrCode = -1) Then ErrCode = cDAClearCol(DA, DA.nCols, 1)
      Case 5         'clear last row in all sheets
	 ErrCode = cDACreate(DA, False)
	 If (ErrCode = -1) Then ErrCode = cDAClearRow(DA, DA.nRows, -1)
      Case 6         'clear last col in all sheets
	 ErrCode = cDACreate(DA, False)
	 If (ErrCode = -1) Then ErrCode = cDAClearCol(DA, DA.nCols, -1)
      End Select
   Tmp = Tmp & "ErrCode = " & ErrCode & Chr$(13) & Chr$(13)
   If (ErrCode = True) Then
      
      Tmp = Tmp & "DA.daSize       = " & DA.daSize & Chr$(13)
      Tmp = Tmp & "DA.Signature    = " & DA.Signature & Chr$(13)
      Tmp = Tmp & "DA.nFilename    = " & Trim$(DA.nFilename) & Chr$(13)
      Tmp = Tmp & "DA.nType        = " & DA.nType & Chr$(13)
      Tmp = Tmp & "DA.nIsTyped     = " & DA.nIsTyped & Chr$(13)
      Tmp = Tmp & "DA.nRows        = " & DA.nRows & Chr$(13)
      Tmp = Tmp & "DA.nCols        = " & DA.nCols & Chr$(13)
      Tmp = Tmp & "DA.nSheets      = " & DA.nSheets & Chr$(13)
      Tmp = Tmp & "DA.rHandle      = " & DA.rHandle & Chr$(13)
      Tmp = Tmp & "DA.rElementSize = " & DA.rElementSize & Chr$(13)
      Tmp = Tmp & "DA.rFileSize    = " & DA.rFileSize & Chr$(13)
      Tmp = Tmp & "DA.rParts       = " & DA.rParts & Chr$(13)
      Tmp = Tmp & "DA.rRemain      = " & DA.rRemain & Chr$(13)
      Tmp = Tmp & "DA.rSheetSize   = " & DA.rSheetSize & Chr$(13)
      Tmp = Tmp & "DA.rTime        = " & DA.rTime & Chr$(13) & Chr$(13)
      If (Management = True) Then
	 ErrCode = cTasks(TE, True)
	 Call cDAPutType(DA, 1, 1, 1, TE)
	 ErrCode = cTasks(TE, False)
	 Call cDAPutType(DA, 1, DA.nCols, 1, TE)
	 ErrCode = cTasks(TE, False)
	 Call cDAPutType(DA, DA.nRows, 1, 1, TE)
	 ErrCode = cTasks(TE, False)
	 Call cDAPutType(DA, DA.nRows, DA.nCols, 1, TE)
	 ErrCode = cTasks(TE, False)
	 Call cDAPutType(DA, 1, 1, 2, TE)
	 ErrCode = cTasks(TE, False)
	 Call cDAPutType(DA, 1, DA.nCols, 2, TE)
	 ErrCode = cTasks(TE, False)
	 Call cDAPutType(DA, DA.nRows, 1, 2, TE)
	 ErrCode = cTasks(TE, False)
	 Call cDAPutType(DA, DA.nRows, DA.nCols, 2, TE)
      End If
      Call cDAGetType(DA, 1, 1, 1, TE)
      Tmp = Tmp & "R:1  , C:1  , D:1, TE.szModule : " & cCompress(TE.szModule) & "   , time : " & DA.rTime & Chr$(13)
      Call cDAGetType(DA, 1, DA.nCols, 1, TE)
      Tmp = Tmp & "R:1  , C:" & DA.nCols & ", D:1, TE.szModule : " & cCompress(TE.szModule) & "   , time : " & DA.rTime & Chr$(13)
      Call cDAGetType(DA, DA.nRows, 1, 1, TE)
      Tmp = Tmp & "R:" & DA.nRows & ", C:1  , D:1, TE.szModule : " & cCompress(TE.szModule) & "   , time : " & DA.rTime & Chr$(13)
      Call cDAGetType(DA, DA.nRows, DA.nCols, 1, TE)
      Tmp = Tmp & "R:" & DA.nRows & ", C:" & DA.nCols & ", D:1, TE.szModule : " & cCompress(TE.szModule) & "   , time : " & DA.rTime & Chr$(13)
      Call cDAGetType(DA, 1, 1, 2, TE)
      Tmp = Tmp & "R:1  , C:1  , D:2, TE.szModule : " & cCompress(TE.szModule) & "   , time : " & DA.rTime & Chr$(13)
      Call cDAGetType(DA, 1, DA.nCols, 2, TE)
      Tmp = Tmp & "R:1  , C:" & DA.nCols & ", D:2, TE.szModule : " & cCompress(TE.szModule) & "   , time : " & DA.rTime & Chr$(13)
      Call cDAGetType(DA, DA.nRows, 1, 2, TE)
      Tmp = Tmp & "R:" & DA.nRows & ", C:1  , D:2, TE.szModule : " & cCompress(TE.szModule) & "   , time : " & DA.rTime & Chr$(13)
      Call cDAGetType(DA, DA.nRows, DA.nCols, 2, TE)
      Tmp = Tmp & "R:" & DA.nRows & ", C:" & DA.nCols & ", D:2, TE.szModule : " & cCompress(TE.szModule) & "   , time : " & DA.rTime & Chr$(13)
   End If
   Call cDAClose(DA, False)
   Label3.Caption = Tmp
End Sub
Sub TestDecrypt ()
   Dim title      As String
   Dim Tmp        As String
   Dim Tmp1       As String
   Dim Tmp2       As String
   Dim Tmp3       As String
   Dim i          As Integer
   Dim j          As Integer
   Tmp3 = cToHexa(Format$(76543210))
   Tmp2 = "TIME TO WIN"
   For i = ENCRYPT_LEVEL_0 To ENCRYPT_LEVEL_4
      Tmp = cEncrypt(Tmp2, Tmp3, i)
      Tmp1 = Tmp1 & "Decrypt (level " & i & ") of [" & Tmp & "] with '?' is "
      Tmp1 = Tmp1 & "[" & cDecrypt(Tmp, Tmp3, i) & "]" & Chr$(13) & Chr$(13)
   Next i
   cStartBasisTimer
   For i = 1 To Item
      Tmp2 = cDecrypt(Tmp2, Tmp1, ENCRYPT_LEVEL_3)
   Next i
   Tmp1 = Tmp1 & "speed for " & Item & " = " & cReadBasisTimer() & " ms"
   Label3.Caption = Tmp1
End Sub
Sub TestDeviationI ()
   Dim title      As String
   Dim Tmp        As String
   Dim Tmp1       As String
   Dim Tmp2       As String
   Dim i          As Integer
   Dim j          As Integer
   Dim m          As Double
   Dim n          As Double
   ReDim array(ItemMean) As Integer
   Randomize Timer
   m = 0
   For i = LBound(array) To UBound(array)
      array(i) = Int(RandI * Rnd(1))
      m = m + array(i)
      List1.AddItem "" & array(i)
   Next i
   m = m / (UBound(array) - LBound(array) + 1)
   n = 0
   For i = LBound(array) To UBound(array)
      n = n + ((array(i) - m) * (array(i) - m))
   Next i
   n = (Sqr(n) / (UBound(array) - LBound(array) + 1))
   Tmp1 = "The Deviation of a integer array of " & (ItemMean + 1) & " elements is " & Chr$(13) & Chr$(13) & cDeviationI(array()) & " (" & n & ")" & Chr$(13) & Chr$(13)
   cStartBasisTimer
   For i = 1 To ItemFile
      m = cDeviationI(array())
   Next i
   Tmp1 = Tmp1 & "speed for " & ItemFile & " = " & cReadBasisTimer() & " ms"
   Label3.Caption = Tmp1
End Sub
Sub TestDOSGetVolLabel ()
   Dim title         As String
   Dim Tmp           As String
   Dim Tmp1          As String
   Dim Tmp2          As String
   Dim i             As Integer
   Dim j             As Integer
   For i = 1 To 4
      Tmp2 = cDOSGetVolumeLabel(Chr$(64 + i))
      If (Len(Tmp2) > 0) Then
	 Tmp1 = Tmp1 & "Drive " & Chr$(64 + i) & " : '" & Tmp2 & "'" & Chr$(13)
      Else
	 Tmp1 = Tmp1 & "Drive " & Chr$(64 + i) & " : no volume label" & Chr$(13)
      End If
   Next i
   Tmp1 = Tmp1 + Chr$(13)
   cStartBasisTimer
   For i = 1 To Item
      Tmp2 = cDOSGetVolumeLabel("C")
   Next i
   Tmp1 = Tmp1 & "speed for " & Item & " = " & cReadBasisTimer() & " ms"
   Label3.Caption = Tmp1
End Sub
Sub TestDOSMediaID ()
   Dim title         As String
   Dim Tmp           As String
   Dim Tmp1          As String
   Dim Tmp2          As String
   Dim i             As Integer
   Dim j             As Integer
   Dim MEDIAID       As tagMEDIAID
   For i = 1 To 7
      If (cDOSGetMediaID(Chr$(64 + i), MEDIAID) = True) Then
	 Tmp1 = Tmp1 & "Drive " & Chr$(64 + i) & " : " & Chr$(13)
	 Tmp1 = Tmp1 & "   SerialNumber is '" & Hex$(MEDIAID.SerialNumber) & "'" & Chr$(13)
	 Tmp1 = Tmp1 & "   VolLabel is '" & MEDIAID.VolLabel & "'" & Chr$(13)
	 Tmp1 = Tmp1 & "   FileSysType is '" & MEDIAID.FileSysType & "'" & Chr$(13) & Chr$(13)
      Else
	 Tmp1 = Tmp1 & "Drive " & Chr$(64 + i) & " : no media id" & Chr$(13) & Chr$(13)
      End If
   Next i
   Tmp1 = Tmp1 + Chr$(13)
   cStartBasisTimer
   For i = 1 To Item
      j = cDOSGetMediaID("", MEDIAID)
   Next i
   Tmp1 = Tmp1 & "speed for " & Item & " = " & cReadBasisTimer() & " ms"
   Label3.Caption = Tmp1
End Sub
Sub TestDriveType ()
   Dim title      As String
   Dim Tmp        As String
   Dim Tmp1       As String
   Dim Tmp2       As String
   Dim i          As Integer
   Dim j          As Integer
   Tmp1 = ""
   For i = 1 To 26
      j = cGetDriveType(Chr$(64 + i))
      If (j > 0) Then
	 Tmp1 = Tmp1 & "'" & Chr$(64 + i) & ":' is "
	 Select Case j
	    Case 2
	       Tmp1 = Tmp1 & "removable disk" & Chr$(13)
	    Case 3
	       Tmp1 = Tmp1 & "fixed disk" & Chr$(13)
	    Case 4
	       Tmp1 = Tmp1 & "remote disk" & Chr$(13)
	    Case 20
	       Tmp1 = Tmp1 & "cd-rom" & Chr$(13)
	 End Select
      End If
   Next i
   Tmp1 = Tmp1 + Chr$(13)
   cStartBasisTimer
   For i = 1 To Item
      j = cGetDriveType("C")
   Next i
   Tmp1 = Tmp1 & "speed for " & Item & " = " & cReadBasisTimer() & " ms"
   Label3.Caption = Tmp1
End Sub
Sub TestEncrypt ()
   Dim title      As String
   Dim Tmp        As String
   Dim Tmp1       As String
   Dim Tmp2       As String
   Dim Tmp3       As String
   Dim i          As Integer
   Dim j          As Integer
   Tmp3 = cToHexa(Format$(76543210))
   Tmp2 = "TIME TO WIN"
   Tmp = Text1.Text
   For i = ENCRYPT_LEVEL_0 To ENCRYPT_LEVEL_4
      Tmp1 = Tmp1 & "Encrypt (level " & i & ") of [" & Tmp2 & "] with '?' is "
      Tmp1 = Tmp1 & "[" & cEncrypt(Tmp2, Tmp3, i) & "]" & Chr$(13) & Chr$(13)
   Next i
   cStartBasisTimer
   For i = 1 To Item
      Tmp2 = cEncrypt(Tmp2, Tmp1, ENCRYPT_LEVEL_3)
   Next i
   Tmp1 = Tmp1 & "speed for " & Item & " = " & cReadBasisTimer() & " ms"
   Label3.Caption = Tmp1
End Sub
Sub TestExpandTab ()
   Dim title      As String
   Dim Tmp        As String
   Dim Tmp1       As String
   Dim Tmp2       As String
   Dim i          As Integer
   Dim j          As Integer
   Tmp = "A" & Chr$(9) & "BC" & Chr$(9) & "DEF" & Chr$(9) & "GHIJ" & Chr$(9) & ""
   title = "Expand tab (2 chars) into [" & Tmp & "] is " & Chr$(13) & Chr$(13)
   Tmp1 = title & cExpandTab(Tmp, 2) & Chr$(13) & Chr$(13)
   Tmp = "A" & Chr$(9) & "BC" & Chr$(9) & "DEF" & Chr$(9) & "GHIJ" & Chr$(9) & ""
   title = "Expand tab (4 chars) into [" & Tmp & "] is " & Chr$(13) & Chr$(13)
   Tmp1 = Tmp1 & title & cExpandTab(Tmp, 4) & Chr$(13) & Chr$(13)
   cStartBasisTimer
   For i = 1 To Item
      Tmp2 = cExpandTab(Tmp, 3)
   Next i
   Tmp1 = Tmp1 & "speed for " & Item & " = " & cReadBasisTimer() & " ms"
   Label3.Caption = Tmp1
End Sub
Sub TestFileChangeChars ()
   Dim title      As String
   Dim Tmp        As String
   Dim Tmp1       As String
   Dim Tmp2       As String
   Dim Tmp3       As String
   Dim Tmp4       As String
   Dim i          As Integer
   Dim j          As Long
   Tmp1 = ""
   Tmp = "c:\autoexec.bat"
   Tmp2 = "c:\autoexec.tab"
   Tmp3 = "REM"
   Tmp4 = "rem"
   Tmp1 = Tmp1 & "File Copy " & Tmp & " to " & Tmp2 & " is " & cFileCopy(Tmp, Tmp2) & Chr$(13) & Chr$(13)
   Tmp1 = Tmp1 & "File Change Chars : '" & Tmp3 & "' -> '" & Tmp4 & "' in '" & Tmp2 & "' is " & cFileChangeChars(Tmp2, Tmp3, Tmp4, "c:\tmp.tmp") & Chr$(13) & Chr$(13)
   cStartBasisTimer
   For i = 1 To Item
      If ((i Mod 2) = 1) Then
	 j = cFileChangeChars(Tmp2, Tmp3, Tmp4, "")
      Else
	 j = cFileChangeChars(Tmp2, Tmp4, Tmp3, "")
      End If
   Next i
   Tmp1 = Tmp1 & "speed for " & Item & " = " & cReadBasisTimer() & " ms" & Chr$(13) & Chr$(13)
   Label3.Caption = Tmp1
End Sub
Sub TestFileCmp ()
   Dim title      As String
   Dim Tmp        As String
   Dim Tmp1       As String
   Dim Tmp2       As String
   Dim i          As Integer
   Dim j          As Integer
   Tmp1 = ""
   Tmp = "c:\autoexec.bat"
   Tmp2 = "c:\tmp\autoexec.bat"
   Tmp1 = Tmp1 & "Compare file attribute " & Tmp & " with " & Tmp2 & " is " & cCmpFileAttribute(Tmp, Tmp2) & Chr$(13)
   Tmp1 = Tmp1 & "Compare file size " & Tmp & " with " & Tmp2 & " is " & cCmpFileSize(Tmp, Tmp2) & Chr$(13)
   Tmp1 = Tmp1 & "Compare file time " & Tmp & " with " & Tmp2 & " is " & cCmpFileTime(Tmp, Tmp2) & Chr$(13)
   Tmp1 = Tmp1 & "Compare file contents (case sensitive) " & Tmp & " with " & Tmp2 & " is " & cCmpFileContents(Tmp, Tmp2, True) & Chr$(13)
   Tmp1 = Tmp1 & "Compare file contents (not sensitive) " & Tmp & " with " & Tmp2 & " is " & cCmpFileContents(Tmp, Tmp2, False) & Chr$(13) & Chr$(13)
   cStartBasisTimer
   For i = 1 To Item
      j = cCmpFileSize(Tmp, Tmp2)
   Next i
   Tmp1 = Tmp1 & "file size speed for " & Item & " = " & cReadBasisTimer() & " ms" & Chr$(13) & Chr$(13)
   cStartBasisTimer
   For i = 1 To Item
      j = cCmpFileContents(Tmp, Tmp2, True)
   Next i
   Tmp1 = Tmp1 & "file contents (cs) speed for " & Item & " = " & cReadBasisTimer() & " ms" & Chr$(13) & Chr$(13)
   cStartBasisTimer
   For i = 1 To Item
      j = cCmpFileContents(Tmp, Tmp2, False)
   Next i
   Tmp1 = Tmp1 & "file contents (ns) speed for " & Item & " = " & cReadBasisTimer() & " ms"
   Label3.Caption = Tmp1
End Sub
Sub TestFileCompress ()
   Dim title      As String
   Dim Tmp        As String
   Dim Tmp1       As String
   Dim Tmp2       As String
   Dim Tmp3       As String
   Dim i          As Integer
   Dim j          As Long
   Tmp1 = ""
   Tmp = "c:\autoexec.bat"
   Tmp2 = "c:\autoexec.tb1"
   Tmp3 = "c:\autoexec.tb2"
   Tmp1 = Tmp1 & "File Compress '" & Tmp & "' to '" & Tmp2 & "' is " & cFileCompress(Tmp, Tmp2) & Chr$(13)
   Tmp1 = Tmp1 & "File Expand '" & Tmp2 & "' to '" & Tmp3 & "' is " & cFileExpand(Tmp2, Tmp3) & Chr$(13)
   Tmp1 = Tmp1 & "Compare file contents (not sensitive) '" & Tmp & "' with '" & Tmp3 & "' is " & IIf(cCmpFileContents(Tmp, Tmp3, False) = -1, "same", "not same") & Chr$(13) & Chr$(13)
   cStartBasisTimer
   For i = 1 To Item
      j = cFileCompress(Tmp, Tmp2)
   Next i
   j = cFileExpand(Tmp2, Tmp3)
   Tmp1 = Tmp1 & "speed for " & Item & " = " & cReadBasisTimer() & " ms" & Chr$(13) & Chr$(13)
   Label3.Caption = Tmp1
End Sub
Sub TestFileCompressTab ()
   Dim title      As String
   Dim Tmp        As String
   Dim Tmp1       As String
   Dim Tmp2       As String
   Dim Tmp3       As String
   Dim i          As Integer
   Dim j          As Long
   Tmp1 = ""
   Tmp = "c:\autoexec.bat"
   Tmp2 = "c:\autoexec.tb1"
   Tmp3 = "c:\autoexec.tb2"
   For i = 1 To 4
      Tmp1 = Tmp1 & "File CompressTab (" & i & " spaces = 1 tab) " & Tmp & " to " & Tmp2 & " is " & cFileCompressTab(Tmp, Tmp2, i) & Chr$(13)
      Tmp1 = Tmp1 & "File ExpandTab (" & i & " spaces = 1 tab) " & Tmp2 & " to " & Tmp3 & " is " & cFileExpandTab(Tmp2, Tmp3, i) & Chr$(13)
      Tmp1 = Tmp1 & "Compare file contents (not sensitive) '" & Tmp & "' with '" & Tmp3 & "' is " & IIf(cCmpFileContents(Tmp, Tmp3, False) = -1, "same", "not same") & Chr$(13) & Chr$(13)
   Next i
   cStartBasisTimer
   For i = 1 To Item
      j = cFileCompressTab(Tmp, Tmp2, 3)
   Next i
   j = cFileExpandTab(Tmp2, Tmp3, 3)
   Tmp1 = Tmp1 & "speed for " & Item & " = " & cReadBasisTimer() & " ms" & Chr$(13) & Chr$(13)
   Label3.Caption = Tmp1
End Sub
Sub TestFileCopy ()
   Dim title      As String
   Dim Tmp        As String
   Dim Tmp1       As String
   Dim Tmp2       As String
   Dim i          As Integer
   Dim j          As Long
   Tmp1 = ""
   Tmp = "c:\autoexec.bat"
   Tmp2 = "c:\autoexec.tab"
   Tmp1 = Tmp1 & "File Copy " & Tmp & " to " & Tmp2 & " is " & cFileCopy(Tmp, Tmp2) & Chr$(13) & Chr$(13)
   cStartBasisTimer
   For i = 1 To Item
      j = cFileCopy(Tmp, Tmp2)
   Next i
   Tmp1 = Tmp1 & "speed for " & Item & " = " & cReadBasisTimer() & " ms" & Chr$(13) & Chr$(13)
   Label3.Caption = Tmp1
End Sub
Sub TestFileCRC32 ()
   Dim title      As String
   Dim Tmp        As String
   Dim Tmp1       As String
   Dim Tmp2       As String
   Dim i          As Integer
   Dim j          As Integer
   Dim k          As Long
   Tmp = "c:\config.sys"
   title = "CRC32 for file '" & Tmp & "' is "
   Tmp1 = Tmp1 & title & Hex$(cFileCRC32(Tmp, OPEN_MODE_BINARY)) & Chr$(13) & Chr$(13)
   Tmp = "c:\autoexec.bat"
   title = "CRC32 for file '" & Tmp & "' is "
   Tmp1 = Tmp1 & title & Hex$(cFileCRC32(Tmp, OPEN_MODE_BINARY)) & Chr$(13) & Chr$(13)
   Tmp = "c:\command.com"
   title = "CRC32 for file '" & Tmp & "' is "
   Tmp1 = Tmp1 & title & Hex$(cFileCRC32(Tmp, OPEN_MODE_BINARY)) & Chr$(13) & Chr$(13)
   cStartBasisTimer
   For i = 1 To ItemFile
      k = cFileCRC32(Tmp, OPEN_MODE_BINARY)
   Next i
   Tmp1 = Tmp1 & "speed for " & ItemFile & " = " & cReadBasisTimer() & " ms"
   Label3.Caption = Tmp1
End Sub
Sub TestFileEncrypt ()
   Dim title      As String
   Dim Tmp        As String
   Dim Tmp1       As String
   Dim Tmp2       As String
   Dim Tmp3       As String
   Dim Tmp4       As String
   Dim i          As Integer
   Dim j          As Long
   Tmp1 = ""
   Tmp = "c:\autoexec.bat"
   Tmp2 = "c:\ac.tb1"
   Tmp3 = "c:\ac.tb2"
   Tmp4 = cToHexa(Format$(76543210))
   For i = ENCRYPT_LEVEL_0 To ENCRYPT_LEVEL_4
      Tmp1 = Tmp1 & "Encrypt (level " & i & ") '" & Tmp & "' with '?' to '" & Tmp2 & "' is " & cFileEncrypt(Tmp, Tmp2, Tmp4, i) & Chr$(13)
      Tmp1 = Tmp1 & "Decrypt (level " & i & ") '" & Tmp2 & "' with '?' to '" & Tmp3 & "' is " & cFileDecrypt(Tmp2, Tmp3, Tmp4, i) & Chr$(13)
      Tmp1 = Tmp1 & "Compare (ns) '" & Tmp & "' with '" & Tmp3 & "' is " & IIf(cCmpFileContents(Tmp, Tmp3, False) = -1, "same", "not same") & Chr$(13) & Chr$(13)
   Next i
   cStartBasisTimer
   For i = 1 To Item
      j = cFileEncrypt(Tmp, Tmp2, Tmp4, ENCRYPT_LEVEL_3)
   Next i
   Tmp1 = Tmp1 & "speed for " & Item & " = " & cReadBasisTimer() & " ms" & Chr$(13) & Chr$(13)
   Label3.Caption = Tmp1
End Sub
Sub TestFileFilter ()
   Dim title      As String
   Dim Tmp        As String
   Dim Tmp1       As String
   Dim Tmp2       As String
   Dim Tmp3       As String
   Dim i          As Integer
   Dim j          As Long
   Tmp1 = ""
   Tmp = "c:\autoexec.bat"
   Tmp2 = "c:\autoexec.tab"
   Tmp3 = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
   Tmp3 = Tmp3 + LCase$(Tmp)
   Tmp1 = Tmp1 & "File Filter (A-Z, a-z) " & Tmp & " to " & Tmp2 & " is " & cFileFilter(Tmp, Tmp2, Tmp3) & Chr$(13) & Chr$(13)
   cStartBasisTimer
   For i = 1 To Item
      j = cFileFilter(Tmp, Tmp2, Tmp3)
   Next i
   Tmp1 = Tmp1 & "speed for " & Item & " = " & cReadBasisTimer() & " ms" & Chr$(13) & Chr$(13)
   Label3.Caption = Tmp1
End Sub
Sub TestFileFilterNot ()
   Dim title      As String
   Dim Tmp        As String
   Dim Tmp1       As String
   Dim Tmp2       As String
   Dim Tmp3       As String
   Dim i          As Integer
   Dim j          As Long
   Tmp1 = ""
   Tmp = "c:\autoexec.bat"
   Tmp2 = "c:\autoexec.tab"
   Tmp3 = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
   Tmp3 = Tmp3 + LCase$(Tmp) + " =" + Chr$(13) + Chr$(10)
   Tmp1 = Tmp1 & "File Filter Not in (A-Z, a-z, CR, LF, SPACE, =) " & Tmp & " to " & Tmp2 & " is " & cFileFilterNot(Tmp, Tmp2, Tmp3) & Chr$(13) & Chr$(13)
   cStartBasisTimer
   For i = 1 To Item
      j = cFileFilterNot(Tmp, Tmp2, Tmp3)
   Next i
   Tmp1 = Tmp1 & "speed for " & Item & " = " & cReadBasisTimer() & " ms" & Chr$(13) & Chr$(13)
   Label3.Caption = Tmp1
End Sub
Sub TestFileGetAttrib ()
   Dim title      As String
   Dim Tmp        As String
   Dim Tmp1       As String
   Dim Tmp2       As String
   Dim i          As Integer
   Dim j          As Integer
   Dim FileAttrib As FileAttributeType
   Tmp1 = ""
   Tmp = cFilesInDirectory("*.*", True)
   j = cFileGetAttrib(Tmp, FileAttrib)
   Tmp1 = Tmp1 & "File " & Tmp & IIf(FileAttrib.Archive, " is Archive", " is not Archive") & Chr$(13)
   Tmp1 = Tmp1 & "File " & Tmp & IIf(FileAttrib.Hidden, " is Hidden", " is not Hidden") & Chr$(13)
   Tmp1 = Tmp1 & "File " & Tmp & IIf(FileAttrib.ReadOnly, " is ReadOnly", " is not ReadOnly") & Chr$(13)
   Tmp1 = Tmp1 & "File " & Tmp & IIf(FileAttrib.SubDir, " is SubDir", " is not SubDir") & Chr$(13)
   Tmp1 = Tmp1 & "File " & Tmp & IIf(FileAttrib.System, " is System", " is not System") & Chr$(13) & Chr$(13)
   Tmp = cSubDirectory("*.*", True)
   Tmp = cSubDirectory("*.*", False)
   Tmp = cSubDirectory("*.*", False)
   j = cFileGetAttrib(Tmp, FileAttrib)
   Tmp1 = Tmp1 & "File " & Tmp & IIf(FileAttrib.Archive, " is Archive", " is not Archive") & Chr$(13)
   Tmp1 = Tmp1 & "File " & Tmp & IIf(FileAttrib.Hidden, " is Hidden", " is not Hidden") & Chr$(13)
   Tmp1 = Tmp1 & "File " & Tmp & IIf(FileAttrib.ReadOnly, " is ReadOnly", " is not ReadOnly") & Chr$(13)
   Tmp1 = Tmp1 & "File " & Tmp & IIf(FileAttrib.SubDir, " is SubDir", " is not SubDir") & Chr$(13)
   Tmp1 = Tmp1 & "File " & Tmp & IIf(FileAttrib.System, " is System", " is not System") & Chr$(13) & Chr$(13)
   cStartBasisTimer
   For i = 1 To Item
      j = cFileGetAttrib(Tmp, FileAttrib)
   Next i
   Tmp1 = Tmp1 & "speed for " & Item & " = " & cReadBasisTimer() & " ms"
   Label3.Caption = Tmp1
End Sub
Sub TestFileLineCount ()
   Dim title      As String
   Dim Tmp        As String
   Dim Tmp1       As String
   Dim Tmp2       As String
   Dim Tmp3       As String
   Dim i          As Integer
   Dim j          As Long
   Tmp1 = ""
   Tmp = "C:\AUTOEXEC.BAT"
   Tmp1 = Tmp1 & "Total lines in '" & Tmp & "' are " & cFileLineCount(Tmp) & Chr$(13) & Chr$(13)
   Tmp = "C:\CONFIG.SYS"
   Tmp1 = Tmp1 & "Total lines in '" & Tmp & "' are " & cFileLineCount(Tmp) & Chr$(13) & Chr$(13)
   cStartBasisTimer
   For i = 1 To Item
      j = cFileLineCount(Tmp)
   Next i
   Tmp1 = Tmp1 & "speed for " & Item & " = " & cReadBasisTimer() & " ms" & Chr$(13) & Chr$(13)
   Label3.Caption = Tmp1
End Sub
Sub TestFileMerge ()
   Dim title      As String
   Dim Tmp        As String
   Dim Tmp1       As String
   Dim Tmp2       As String
   Dim Tmp3       As String
   Dim i          As Integer
   Dim j          As Long
   Tmp1 = ""
   Tmp = "c:\autoexec.bat"
   Tmp2 = "c:\config.sys"
   Tmp3 = "c:\merge.byt"
   Tmp1 = Tmp1 & "File Merge '" & Tmp & "' and '" & Tmp2 & "' to '" & Tmp3 & "' is " & cFileMerge(Tmp, Tmp2, Tmp3) & Chr$(13) & Chr$(13)
   cStartBasisTimer
   For i = 1 To Item
      j = cFileMerge(Tmp, Tmp2, Tmp3)
   Next i
   Tmp1 = Tmp1 & "speed for " & Item & " = " & cReadBasisTimer() & " ms" & Chr$(13) & Chr$(13)
   Label3.Caption = Tmp1
End Sub
Sub TestFilePathExists ()
   Dim title      As String
   Dim Tmp        As String
   Dim Tmp1       As String
   Dim Tmp2       As String
   Dim i          As Integer
   Dim j          As Integer
   Tmp1 = "File time2win.dll " & IIf(cFilePathExists("time2win.dll") = True, "found", "not found") & Chr$(13) & Chr$(13)
   Tmp1 = Tmp1 & "Path \windows " & IIf(cFilePathExists("\windows") = True, "found", "not found") & Chr$(13) & Chr$(13)
   Tmp1 = Tmp1 & "Path \windows\wintime " & IIf(cFilePathExists("\windows\wintime") = True, "found", "not found") & Chr$(13) & Chr$(13)
   cStartBasisTimer
   For i = 1 To Item
      j = cFilePathExists("time2win.dll")
   Next i
   Tmp1 = Tmp1 & "speed for " & Item & " = " & cReadBasisTimer() & " ms"
   Label3.Caption = Tmp1
End Sub
Sub TestFileResetAllAttrib ()
   Dim title      As String
   Dim Tmp        As String
   Dim Tmp1       As String
   Dim Tmp2       As String
   Dim i          As Integer
   Dim j          As Integer
   Dim FileAttrib As FileAttributeType
   Tmp1 = ""
   Tmp = "TEST.DAT"
   Call CreateFile
   FileAttrib.Archive = False
   FileAttrib.Hidden = True
   FileAttrib.ReadOnly = True
   FileAttrib.System = True
   j = cFileResetAllAttrib(Tmp)
   j = cFileGetAttrib(Tmp, FileAttrib)
   Tmp1 = "File " & Tmp & " has been reset with" & Chr$(13)
   Tmp1 = Tmp1 & " flag archive" & Chr$(13)
   Tmp1 = Tmp1 & " flag hidden" & Chr$(13)
   Tmp1 = Tmp1 & " flag read-only" & Chr$(13)
   Tmp1 = Tmp1 & " flag system" & Chr$(13) & Chr$(13)
   Tmp1 = Tmp1 & "File " & Tmp & IIf(FileAttrib.Archive, " is Archive", " is not Archive") & Chr$(13)
   Tmp1 = Tmp1 & "File " & Tmp & IIf(FileAttrib.Hidden, " is Hidden", " is not Hidden") & Chr$(13)
   Tmp1 = Tmp1 & "File " & Tmp & IIf(FileAttrib.ReadOnly, " is ReadOnly", " is not ReadOnly") & Chr$(13)
   Tmp1 = Tmp1 & "File " & Tmp & IIf(FileAttrib.System, " is System", " is not System") & Chr$(13) & Chr$(13)
   cStartBasisTimer
   For i = 1 To ItemFile
      j = cFileResetAllAttrib(Tmp)
   Next i
   Tmp1 = Tmp1 & "speed for " & ItemFile & " = " & cReadBasisTimer() & " ms"
   Label3.Caption = Tmp1
End Sub
Sub TestFileResetArchive ()
   Dim title      As String
   Dim Tmp        As String
   Dim Tmp1       As String
   Dim Tmp2       As String
   Dim i          As Integer
   Dim j          As Integer
   Dim nArchive   As Integer
   Dim nHidden    As Integer
   Dim nReadOnly  As Integer
   Dim nSubDir    As Integer
   Dim nSystem    As Integer
   Dim FileAttrib As FileAttributeType
   Tmp1 = ""
   Tmp = "TEST.DAT"
   Call CreateFile
   j = cFileSetAllAttrib(Tmp)
   j = cFileResetArchive(Tmp)
   j = cFileGetAttrib(Tmp, FileAttrib)
   Tmp1 = "File " & Tmp & " has been reset with" & Chr$(13)
   Tmp1 = Tmp1 & " flag archive" & Chr$(13) & Chr$(13)
   Tmp1 = Tmp1 & "File " & Tmp & IIf(FileAttrib.Archive, " is Archive", " is not Archive") & Chr$(13)
   Tmp1 = Tmp1 & "File " & Tmp & IIf(FileAttrib.Hidden, " is Hidden", " is not Hidden") & Chr$(13)
   Tmp1 = Tmp1 & "File " & Tmp & IIf(FileAttrib.ReadOnly, " is ReadOnly", " is not ReadOnly") & Chr$(13)
   Tmp1 = Tmp1 & "File " & Tmp & IIf(FileAttrib.System, " is System", " is not System") & Chr$(13) & Chr$(13)
   cStartBasisTimer
   For i = 1 To ItemFile
      j = cFileResetArchive(Tmp)
   Next i
   Tmp1 = Tmp1 & "speed for " & ItemFile & " = " & cReadBasisTimer() & " ms"
   Label3.Caption = Tmp1
End Sub
Sub TestFileResetHidden ()
   Dim title      As String
   Dim Tmp        As String
   Dim Tmp1       As String
   Dim Tmp2       As String
   Dim i          As Integer
   Dim j          As Integer
   Dim nArchive   As Integer
   Dim nHidden    As Integer
   Dim nReadOnly  As Integer
   Dim nSubDir    As Integer
   Dim nSystem    As Integer
   Dim FileAttrib As FileAttributeType
   Tmp1 = ""
   Tmp = "TEST.DAT"
   Call CreateFile
   j = cFileSetAllAttrib(Tmp)
   j = cFileResetHidden(Tmp)
   j = cFileGetAttrib(Tmp, FileAttrib)
   Tmp1 = "File " & Tmp & " has been reset with" & Chr$(13)
   Tmp1 = Tmp1 & " flag hidden" & Chr$(13) & Chr$(13)
   Tmp1 = Tmp1 & "File " & Tmp & IIf(FileAttrib.Archive, " is Archive", " is not Archive") & Chr$(13)
   Tmp1 = Tmp1 & "File " & Tmp & IIf(FileAttrib.Hidden, " is Hidden", " is not Hidden") & Chr$(13)
   Tmp1 = Tmp1 & "File " & Tmp & IIf(FileAttrib.ReadOnly, " is ReadOnly", " is not ReadOnly") & Chr$(13)
   Tmp1 = Tmp1 & "File " & Tmp & IIf(FileAttrib.System, " is System", " is not System") & Chr$(13) & Chr$(13)
   cStartBasisTimer
   For i = 1 To ItemFile
      j = cFileResetHidden(Tmp)
   Next i
   Tmp1 = Tmp1 & "speed for " & ItemFile & " = " & cReadBasisTimer() & " ms"
   Label3.Caption = Tmp1
End Sub
Sub TestFileResetReadOnly ()
   Dim title      As String
   Dim Tmp        As String
   Dim Tmp1       As String
   Dim Tmp2       As String
   Dim i          As Integer
   Dim j          As Integer
   Dim FileAttrib As FileAttributeType
   Dim nArchive   As Integer
   Dim nHidden    As Integer
   Dim nReadOnly  As Integer
   Dim nSubDir    As Integer
   Dim nSystem    As Integer
   Tmp1 = ""
   Tmp = "TEST.DAT"
   Call CreateFile
   j = cFileSetAllAttrib(Tmp)
   j = cFileResetReadOnly(Tmp)
   j = cFileGetAttrib(Tmp, FileAttrib)
   Tmp1 = "File " & Tmp & " has been reset with" & Chr$(13)
   Tmp1 = Tmp1 & " flag read-only" & Chr$(13) & Chr$(13)
   Tmp1 = Tmp1 & "File " & Tmp & IIf(FileAttrib.Archive, " is Archive", " is not Archive") & Chr$(13)
   Tmp1 = Tmp1 & "File " & Tmp & IIf(FileAttrib.Hidden, " is Hidden", " is not Hidden") & Chr$(13)
   Tmp1 = Tmp1 & "File " & Tmp & IIf(FileAttrib.ReadOnly, " is ReadOnly", " is not ReadOnly") & Chr$(13)
   Tmp1 = Tmp1 & "File " & Tmp & IIf(FileAttrib.System, " is System", " is not System") & Chr$(13) & Chr$(13)
   cStartBasisTimer
   For i = 1 To ItemFile
      j = cFileResetReadOnly(Tmp)
   Next i
   Tmp1 = Tmp1 & "speed for " & ItemFile & " = " & cReadBasisTimer() & " ms"
   Label3.Caption = Tmp1
End Sub
Sub TestFileResetSystem ()
   Dim title      As String
   Dim Tmp        As String
   Dim Tmp1       As String
   Dim Tmp2       As String
   Dim i          As Integer
   Dim j          As Integer
   Dim FileAttrib As FileAttributeType
   Tmp1 = ""
   Tmp = "TEST.DAT"
   Call CreateFile
   j = cFileSetAllAttrib(Tmp)
   j = cFileResetSystem(Tmp)
   j = cFileGetAttrib(Tmp, FileAttrib)
   Tmp1 = "File " & Tmp & " has been reset with" & Chr$(13)
   Tmp1 = Tmp1 & " flag system" & Chr$(13) & Chr$(13)
   Tmp1 = Tmp1 & "File " & Tmp & IIf(FileAttrib.Archive, " is Archive", " is not Archive") & Chr$(13)
   Tmp1 = Tmp1 & "File " & Tmp & IIf(FileAttrib.Hidden, " is Hidden", " is not Hidden") & Chr$(13)
   Tmp1 = Tmp1 & "File " & Tmp & IIf(FileAttrib.ReadOnly, " is ReadOnly", " is not ReadOnly") & Chr$(13)
   Tmp1 = Tmp1 & "File " & Tmp & IIf(FileAttrib.System, " is System", " is not System") & Chr$(13) & Chr$(13)
   cStartBasisTimer
   For i = 1 To ItemFile
      j = cFileResetSystem(Tmp)
   Next i
   Tmp1 = Tmp1 & "speed for " & ItemFile & " = " & cReadBasisTimer() & " ms"
   Label3.Caption = Tmp1
End Sub
Sub TestFileS ()
   Dim title      As String
   Dim Tmp        As String
   Dim Tmp1       As String
   Dim Tmp2       As String
   Dim Tmp3       As String
   Dim Tmp4       As String
   Dim i          As Integer
   Dim j          As Long
   Tmp1 = ""
   Tmp = "c:\autoexec.bat"
   Tmp3 = "re"
   Tmp4 = "SET"
   Tmp1 = Tmp1 & "File Search (insensitive) : '" & Tmp3 & "' in '" & Tmp & "' is " & cFileSearch(Tmp, Tmp3, False) & Chr$(13) & Chr$(13)
   Tmp1 = Tmp1 & "File Search and Count (insensitive) : '" & Tmp3 & "' in '" & Tmp & "' is " & cFileSearchCount(Tmp, Tmp3, False) & Chr$(13) & Chr$(13)
   Tmp1 = Tmp1 & "File Search (insensitive) : '" & Tmp4 & "' in '" & Tmp & "' is " & cFileSearch(Tmp, Tmp4, False) & Chr$(13) & Chr$(13)
   Tmp1 = Tmp1 & "File Search and Count (insensitive) : '" & Tmp4 & "' in '" & Tmp & "' is " & cFileSearchCount(Tmp, Tmp4, False) & Chr$(13) & Chr$(13)
   Tmp1 = Tmp1 & "File Search (sensitive) : '" & Tmp3 & "' in '" & Tmp & "' is " & cFileSearch(Tmp, Tmp3, True) & Chr$(13) & Chr$(13)
   Tmp1 = Tmp1 & "File Search and Count (sensitive) : '" & Tmp3 & "' in '" & Tmp & "' is " & cFileSearchCount(Tmp, Tmp3, True) & Chr$(13) & Chr$(13)
   Tmp1 = Tmp1 & "File Search (sensitive) : '" & Tmp4 & "' in '" & Tmp & "' is " & cFileSearch(Tmp, Tmp4, True) & Chr$(13) & Chr$(13)
   Tmp1 = Tmp1 & "File Search and Count (sensitive) : '" & Tmp4 & "' in '" & Tmp & "' is " & cFileSearchCount(Tmp, Tmp4, True) & Chr$(13) & Chr$(13)
   cStartBasisTimer
   For i = 1 To Item
      If ((i Mod 2) = 1) Then
	 j = cFileSearch(Tmp, Tmp3, False)
      Else
	 j = cFileSearchCount(Tmp, Tmp3, False)
      End If
   Next i
   Tmp1 = Tmp1 & "speed for " & Item & " = " & cReadBasisTimer() & " ms" & Chr$(13) & Chr$(13)
   Label3.Caption = Tmp1
End Sub
Sub TestFileSetAllAttrib ()
   Dim title      As String
   Dim Tmp        As String
   Dim Tmp1       As String
   Dim Tmp2       As String
   Dim i          As Integer
   Dim j          As Integer
   Dim FileAttrib As FileAttributeType
   Tmp1 = ""
   Tmp = "TEST.DAT"
   Call CreateFile
   j = cFileSetAllAttrib(Tmp)
   j = cFileGetAttrib(Tmp, FileAttrib)
   Tmp1 = "File " & Tmp & " has been set with" & Chr$(13)
   Tmp1 = Tmp1 & " flag archive" & Chr$(13)
   Tmp1 = Tmp1 & " flag hidden" & Chr$(13)
   Tmp1 = Tmp1 & " flag read-only" & Chr$(13)
   Tmp1 = Tmp1 & " flag system" & Chr$(13) & Chr$(13)
   Tmp1 = Tmp1 & "File " & Tmp & IIf(FileAttrib.Archive, " is Archive", " is not Archive") & Chr$(13)
   Tmp1 = Tmp1 & "File " & Tmp & IIf(FileAttrib.Hidden, " is Hidden", " is not Hidden") & Chr$(13)
   Tmp1 = Tmp1 & "File " & Tmp & IIf(FileAttrib.ReadOnly, " is ReadOnly", " is not ReadOnly") & Chr$(13)
   Tmp1 = Tmp1 & "File " & Tmp & IIf(FileAttrib.System, " is System", " is not System") & Chr$(13) & Chr$(13)
   cStartBasisTimer
   For i = 1 To ItemFile
      j = cFileSetAllAttrib(Tmp)
   Next i
   Tmp1 = Tmp1 & "speed for " & ItemFile & " = " & cReadBasisTimer() & " ms"
   Label3.Caption = Tmp1
End Sub
Sub TestFileSetArchive ()
   Dim title      As String
   Dim Tmp        As String
   Dim Tmp1       As String
   Dim Tmp2       As String
   Dim i          As Integer
   Dim j          As Integer
   Dim FileAttrib As FileAttributeType
   Tmp1 = ""
   Tmp = "TEST.DAT"
   Call CreateFile
   j = cFileSetArchive(Tmp)
   j = cFileGetAttrib(Tmp, FileAttrib)
   Tmp1 = "File " & Tmp & " has been set with" & Chr$(13)
   Tmp1 = Tmp1 & " flag archive" & Chr$(13) & Chr$(13)
   Tmp1 = Tmp1 & "File " & Tmp & IIf(FileAttrib.Archive, " is Archive", " is not Archive") & Chr$(13)
   Tmp1 = Tmp1 & "File " & Tmp & IIf(FileAttrib.Hidden, " is Hidden", " is not Hidden") & Chr$(13)
   Tmp1 = Tmp1 & "File " & Tmp & IIf(FileAttrib.ReadOnly, " is ReadOnly", " is not ReadOnly") & Chr$(13)
   Tmp1 = Tmp1 & "File " & Tmp & IIf(FileAttrib.System, " is System", " is not System") & Chr$(13) & Chr$(13)
   cStartBasisTimer
   For i = 1 To ItemFile
      j = cFileSetArchive(Tmp)
   Next i
   Tmp1 = Tmp1 & "speed for " & ItemFile & " = " & cReadBasisTimer() & " ms"
   Label3.Caption = Tmp1
End Sub
Sub TestFileSetAttrib ()
   Dim title      As String
   Dim Tmp        As String
   Dim Tmp1       As String
   Dim Tmp2       As String
   Dim i          As Integer
   Dim j          As Integer
   Dim FileAttrib As FileAttributeType
   Tmp1 = ""
   Tmp = "TEST.DAT"
   Call CreateFile
   FileAttrib.Archive = False
   FileAttrib.Hidden = True
   FileAttrib.ReadOnly = True
   FileAttrib.System = True
   j = cFileSetAttrib(Tmp, FileAttrib)
   j = cFileGetAttrib(Tmp, FileAttrib)
   Tmp1 = "File " & Tmp & " has been set with" & Chr$(13)
   Tmp1 = Tmp1 & " flag hidden" & Chr$(13)
   Tmp1 = Tmp1 & " flag read-only" & Chr$(13)
   Tmp1 = Tmp1 & " flag system" & Chr$(13) & Chr$(13)
   Tmp1 = Tmp1 & "File " & Tmp & IIf(FileAttrib.Archive, " is Archive", " is not Archive") & Chr$(13)
   Tmp1 = Tmp1 & "File " & Tmp & IIf(FileAttrib.Hidden, " is Hidden", " is not Hidden") & Chr$(13)
   Tmp1 = Tmp1 & "File " & Tmp & IIf(FileAttrib.ReadOnly, " is ReadOnly", " is not ReadOnly") & Chr$(13)
   Tmp1 = Tmp1 & "File " & Tmp & IIf(FileAttrib.System, " is System", " is not System") & Chr$(13) & Chr$(13)
   cStartBasisTimer
   For i = 1 To ItemFile
      j = cFileSetAttrib(Tmp, FileAttrib)
   Next i
   Tmp1 = Tmp1 & "speed for " & ItemFile & " = " & cReadBasisTimer() & " ms"
   Label3.Caption = Tmp1
End Sub
Sub TestFileSetHidden ()
   Dim title      As String
   Dim Tmp        As String
   Dim Tmp1       As String
   Dim Tmp2       As String
   Dim i          As Integer
   Dim j          As Integer
   Dim FileAttrib As FileAttributeType
   Tmp1 = ""
   Tmp = "TEST.DAT"
   Call CreateFile
   j = cFileSetHidden(Tmp)
   j = cFileGetAttrib(Tmp, FileAttrib)
   Tmp1 = "File " & Tmp & " has been set with" & Chr$(13)
   Tmp1 = Tmp1 & " flag hidden" & Chr$(13) & Chr$(13)
   Tmp1 = Tmp1 & "File " & Tmp & IIf(FileAttrib.Archive, " is Archive", " is not Archive") & Chr$(13)
   Tmp1 = Tmp1 & "File " & Tmp & IIf(FileAttrib.Hidden, " is Hidden", " is not Hidden") & Chr$(13)
   Tmp1 = Tmp1 & "File " & Tmp & IIf(FileAttrib.ReadOnly, " is ReadOnly", " is not ReadOnly") & Chr$(13)
   Tmp1 = Tmp1 & "File " & Tmp & IIf(FileAttrib.System, " is System", " is not System") & Chr$(13) & Chr$(13)
   cStartBasisTimer
   For i = 1 To ItemFile
      j = cFileSetHidden(Tmp)
   Next i
   Tmp1 = Tmp1 & "speed for " & ItemFile & " = " & cReadBasisTimer() & " ms"
   Label3.Caption = Tmp1
End Sub
Sub TestFileSetReadOnly ()
   Dim title      As String
   Dim Tmp        As String
   Dim Tmp1       As String
   Dim Tmp2       As String
   Dim i          As Integer
   Dim j          As Integer
   Dim FileAttrib As FileAttributeType
   Tmp1 = ""
   Tmp = "TEST.DAT"
   Call CreateFile
   j = cFileSetReadOnly(Tmp)
   j = cFileGetAttrib(Tmp, FileAttrib)
   Tmp1 = "File " & Tmp & " has been set with" & Chr$(13)
   Tmp1 = Tmp1 & " flag read-only" & Chr$(13) & Chr$(13)
   Tmp1 = Tmp1 & "File " & Tmp & IIf(FileAttrib.Archive, " is Archive", " is not Archive") & Chr$(13)
   Tmp1 = Tmp1 & "File " & Tmp & IIf(FileAttrib.Hidden, " is Hidden", " is not Hidden") & Chr$(13)
   Tmp1 = Tmp1 & "File " & Tmp & IIf(FileAttrib.ReadOnly, " is ReadOnly", " is not ReadOnly") & Chr$(13)
   Tmp1 = Tmp1 & "File " & Tmp & IIf(FileAttrib.System, " is System", " is not System") & Chr$(13) & Chr$(13)
   cStartBasisTimer
   For i = 1 To ItemFile
      j = cFileSetReadOnly(Tmp)
   Next i
   Tmp1 = Tmp1 & "speed for " & ItemFile & " = " & cReadBasisTimer() & " ms"
   Label3.Caption = Tmp1
End Sub
Sub TestFileSetSystem ()
   Dim title      As String
   Dim Tmp        As String
   Dim Tmp1       As String
   Dim Tmp2       As String
   Dim i          As Integer
   Dim j          As Integer
   Dim FileAttrib As FileAttributeType
   Tmp1 = ""
   Tmp = "TEST.DAT"
   Call CreateFile
   j = cFileSetSystem(Tmp)
   j = cFileGetAttrib(Tmp, FileAttrib)
   Tmp1 = "File " & Tmp & " has been set with" & Chr$(13)
   Tmp1 = Tmp1 & " flag system" & Chr$(13) & Chr$(13)
   Tmp1 = Tmp1 & "File " & Tmp & IIf(FileAttrib.Archive, " is Archive", " is not Archive") & Chr$(13)
   Tmp1 = Tmp1 & "File " & Tmp & IIf(FileAttrib.Hidden, " is Hidden", " is not Hidden") & Chr$(13)
   Tmp1 = Tmp1 & "File " & Tmp & IIf(FileAttrib.ReadOnly, " is ReadOnly", " is not ReadOnly") & Chr$(13)
   Tmp1 = Tmp1 & "File " & Tmp & IIf(FileAttrib.System, " is System", " is not System") & Chr$(13) & Chr$(13)
   cStartBasisTimer
   For i = 1 To ItemFile
      j = cFileSetSystem(Tmp)
   Next i
   Tmp1 = Tmp1 & "speed for " & ItemFile & " = " & cReadBasisTimer() & " ms"
   Label3.Caption = Tmp1
End Sub
Sub TestFilesInDirectory ()
   Dim title      As String
   Dim Tmp        As String
   Dim Tmp1       As String
   Dim Tmp2       As String
   Dim i          As Integer
   Dim j          As Integer
   Dim k          As Long
   title = "The 10 first files in this directory are" & Chr$(13) & Chr$(13)
   Tmp1 = title
   Tmp2 = cFilesInDirectory("*.*", True)
   For i = 1 To 10
      Tmp1 = Tmp1 & Tmp2 & Chr$(13)
      Tmp2 = cFilesInDirectory("*.*", False)
   Next i
   Tmp1 = Tmp1 & Chr$(13)
   cStartBasisTimer
   For i = 1 To Item
      Tmp = cFilesInDirectory("*.*", True)
   Next i
   Tmp1 = Tmp1 & "speed for " & Item & " = " & cReadBasisTimer() & " ms"
   Label3.Caption = Tmp1
End Sub
Sub TestFilesInDirOnDisk ()
   Dim title      As String
   Dim Tmp        As String
   Dim Tmp1       As String
   Dim Tmp2       As String
   Dim i          As Integer
   Dim j          As Integer
   Dim k          As Long
   j = cFilesInDirOnDisk("c:\test.tmp", "c:\*.*", A_ALL)
   Tmp1 = "The files (any attributes) in 'C:\' are (" & j & ") see first list" & Chr$(13) & Chr$(13)
   j = cFileToListBox(List1.hWnd, "c:\test.tmp")
   j = cFilesInDirOnDisk("c:\test1.tmp", "c:\*.*", -A_ARCH)
   Tmp1 = Tmp1 & "The files (only archive, not other attribute) in 'C:\' are (" & j & ") see second list" & Chr$(13) & Chr$(13)
   j = cFileToListBox(List2.hWnd, "c:\test1.tmp")
   Tmp1 = Tmp1 & "Number of files (with at least one of the following attribute)" & Chr$(13) & Chr$(13)
   Tmp1 = Tmp1 & "Any : " & cFilesInDirOnDisk("c:\test.tmp", "c:\*.*", A_ALL) & Chr$(13)
   Tmp1 = Tmp1 & "(N)ormal : " & cFilesInDirOnDisk("c:\test.tmp", "c:\*.*", A_NORMAL) & Chr$(13)
   Tmp1 = Tmp1 & "(A)rchive, (N)ormal : " & cFilesInDirOnDisk("c:\test.tmp", "c:\*.*", A_NORMAL_ARCHIVE) & Chr$(13)
   Tmp1 = Tmp1 & "(A)rchive : " & cFilesInDirOnDisk("c:\test.tmp", "c:\*.*", A_ARCH) & Chr$(13)
   Tmp1 = Tmp1 & "(A)rchive, (R)ead-Only : " & cFilesInDirOnDisk("c:\test.tmp", "c:\*.*", A_ARCH Or A_RDONLY) & Chr$(13)
   Tmp1 = Tmp1 & "(S)ystem, (H)idden, (R)ead-Only : " & cFilesInDirOnDisk("c:\test.tmp", "c:\*.*", A_SYSTEM Or A_HIDDEN Or A_RDONLY) & Chr$(13)
   Tmp1 = Tmp1 & "(H)idden, (R)ead-Only : " & cFilesInDirOnDisk("c:\test.tmp", "c:\*.*", A_HIDDEN Or A_RDONLY) & Chr$(13)
   Tmp1 = Tmp1 & "(R)ead-Only : " & cFilesInDirOnDisk("c:\test.tmp", "c:\*.*", A_RDONLY) & Chr$(13)
   Tmp1 = Tmp1 & Chr$(13)
   Tmp1 = Tmp1 & "Number of files (with exact attribute excluding all others)" & Chr$(13) & Chr$(13)
   Tmp1 = Tmp1 & "(N)ormal : " & cFilesInDirOnDisk("c:\test.tmp", "c:\*.*", -(A_NORMAL)) & Chr$(13)
   Tmp1 = Tmp1 & "(A)rchive : " & cFilesInDirOnDisk("c:\test.tmp", "c:\*.*", -(A_ARCH)) & Chr$(13)
   Tmp1 = Tmp1 & "(A)rchive, (R)ead-Only : " & cFilesInDirOnDisk("c:\test.tmp", "c:\*.*", -(A_ARCH Or A_RDONLY)) & Chr$(13)
   Tmp1 = Tmp1 & "(S)ystem, (H)idden, (R)ead-Only : " & cFilesInDirOnDisk("c:\test.tmp", "c:\*.*", -(A_SYSTEM Or A_HIDDEN Or A_RDONLY)) & Chr$(13)
   Tmp1 = Tmp1 & "(H)idden, (R)ead-Only : " & cFilesInDirOnDisk("c:\test.tmp", "c:\*.*", -(A_HIDDEN Or A_RDONLY)) & Chr$(13)
   Tmp1 = Tmp1 & "(R)ead-Only : " & cFilesInDirOnDisk("c:\test.tmp", "c:\*.*", -(A_RDONLY)) & Chr$(13)
   Tmp1 = Tmp1 & Chr$(13)
   cStartBasisTimer
   For i = 1 To Item
      j = cFilesInDirOnDisk("c:\test.tmp", "c:\*.*", A_ALL)
   Next i
   Tmp1 = Tmp1 & "speed for " & Item & " = " & cReadBasisTimer() & " ms"
   Label3.Caption = Tmp1
End Sub
Sub TestFilesInDirToArray ()
   Dim title      As String
   Dim Tmp        As String
   Dim Tmp1       As String
   Dim Tmp2       As String
   Dim i          As Long
   Dim r          As Integer
   Dim m1         As Integer
   Dim m2         As Integer
   m1 = -999
   m2 = 1000
   ReDim AD(m1 To m2)         As tagVARSTRING
   ' initialization because we use ReDim without Global definition
   For i = m1 To m2
      AD(i).Contents = Space$(256)
   Next i
   r = cFilesInDirToArray("C:\*.*", A_ALL, AD())
   Tmp1 = "Reading directory 'C:\*.*' into AD(" & m1 & " To " & m2 & ") is '" & r & "'" & Chr$(13)
   Tmp1 = Tmp1 & "   The 3 (on " & r & ") first files in array are : " & Chr$(13) & Chr$(13)
   For i = 0 To 2
      Tmp1 = Tmp1 & AD(m1 + i).Contents & Chr$(13)
   Next i
   Tmp1 = Tmp1 & Chr$(13)
   Tmp1 = Tmp1 & "   The 3 (on " & r & ") last files in array are : " & Chr$(13) & Chr$(13)
   For i = 0 To 2
      Tmp1 = Tmp1 & AD(m1 + r - 1 - 2 + i).Contents & Chr$(13)
   Next i
   Tmp1 = Tmp1 & Chr$(13)
   r = cArrayToListBox(List1.hWnd, AD())
   Tmp2 = cGetDefaultCurrentDir()
   r = cFilesInDirToArray("*.*", A_ALL, AD())
   Tmp1 = Tmp1 & "Reading directory '" & Tmp2 & "' into AD(" & m1 & " To " & m2 & ") is '" & r & "'" & Chr$(13)
   Tmp1 = Tmp1 & "   The 3 (on " & r & ") first files in array are : " & Chr$(13) & Chr$(13)
   For i = 0 To 2
      Tmp1 = Tmp1 & AD(m1 + i).Contents & Chr$(13)
   Next i
   Tmp1 = Tmp1 & Chr$(13)
   Tmp1 = Tmp1 & "   The 3 (on " & r & ") last files in array are : " & Chr$(13) & Chr$(13)
   For i = 0 To 2
      Tmp1 = Tmp1 & AD(m1 + r - 1 - 2 + i).Contents & Chr$(13)
   Next i
   r = cArrayToListBox(List2.hWnd, AD())
   cStartBasisTimer
   For i = 1 To Item
      r = cFilesInDirToArray("C:\*.*", A_ALL, AD())
   Next i
   Tmp1 = Tmp1 & Chr$(13) & "speed for " & Item & " = " & cReadBasisTimer() & " ms"
   Label3.Caption = Tmp1
End Sub
Sub TestFilesInfoInDir ()
   Dim title      As String
   Dim Tmp        As String
   Dim Tmp1       As String
   Dim Tmp2       As String
   Dim i          As Integer
   Dim j          As Integer
   Dim k          As Long
   Dim FI         As tagFILEINFO
   title = "The 7 first files in the current directory '" & cGetDefaultCurrentDir() & "' are" & Chr$(13) & Chr$(13)
   Tmp1 = title
   Tmp2 = cFilesInfoInDir("*.*", FI, True)
   For i = 1 To 7
      Tmp1 = Tmp1 & Tmp2 & ", " & FI.fSize & ", " & FI.fDate & ", " & FI.fTime & ", " & FI.fAttribute & Chr$(13)
      Tmp2 = cFilesInfoInDir("*.*", FI, False)
   Next i
   Tmp1 = Tmp1 & Chr$(13)
   cStartBasisTimer
   For i = 1 To Item
      Tmp = cFilesInfoInDir("*.*", FI, True)
   Next i
   Tmp1 = Tmp1 & "speed for " & Item & " = " & cReadBasisTimer() & " ms"
   Label3.Caption = Tmp1
End Sub
Sub TestFileSize ()
   Dim title      As String
   Dim Tmp        As String
   Dim Tmp1       As String
   Dim Tmp2       As String
   Dim i          As Integer
   Dim j          As Integer
   Dim k          As Long
   Tmp1 = "File size for time2win.dll is " & cFileSize("time2win.dll") & Chr$(13) & Chr$(13)
   Tmp1 = Tmp1 & "File size for Path \windows " & cFileSize("\windows") & Chr$(13) & Chr$(13)
   Tmp1 = Tmp1 & "File size for Path \windows\wintime " & cFileSize("\windows\wintime") & Chr$(13) & Chr$(13)
   cStartBasisTimer
   For i = 1 To Item
      k = cFileSize("time2win.dll")
   Next i
   Tmp1 = Tmp1 & "speed for " & Item & " = " & cReadBasisTimer() & " ms"
   Label3.Caption = Tmp1
End Sub
Sub TestFileSort (SortMethod As Integer, VarFix As Integer)
   Dim title      As String
   Dim Tmp        As String
   Dim Tmp1       As String
   Dim Tmp2       As String
   Dim Tmp3       As String
   Dim i          As Integer
   Dim j          As Integer
   Dim n          As Integer
   Dim m          As Double
   Tmp = "c:\autoexec.bat"
   Tmp2 = "c:\ae" & Format$(SortMethod) & ".tab"
   Close #1
   Open Tmp For Input Shared As #1
   While Not EOF(1)
      Line Input #1, Tmp3
      List1.AddItem Tmp3
   Wend
   Close #1
   If (VarFix = False) Then
      j = cFileSort("c:\autoexec.bat", Tmp2, SortMethod, -1, -1, -1, n)
   Else
      'j = cFileSort("c:\autoexec.bat", Tmp2, SortMethod, 20, 0, 10, n)
      j = cFileSort("c:\tmp\_dat_hr.Dat", "c:\tmp\tmp" & SortMethod & ".tmp", SortMethod, 50, 0, 11, n)
   End If
   Close #1
   Open Tmp2 For Input Shared As #1
   While Not EOF(1)
      Line Input #1, Tmp3
      List2.AddItem Tmp3
   Wend
   Close #1
   Select Case SortMethod
      Case (SORT_ASCENDING + SORT_CASE_SENSITIVE):
	 Tmp1 = Tmp1 + "Sort '" & Tmp & "' into '" & Tmp2 & "' in ASC and CS is '" & j & "' and records are '" & n & "'"
      Case (SORT_DESCENDING + SORT_CASE_SENSITIVE):
	 Tmp1 = Tmp1 + "Sort '" & Tmp & "' into '" & Tmp2 & "' in DSC and CS is '" & j & "' and records are '" & n & "'"
      Case (SORT_ASCENDING + SORT_CASE_INSENSITIVE):
	 Tmp1 = Tmp1 + "Sort '" & Tmp & "' into '" & Tmp2 & "' in ASC and NS is '" & j & "' and records are '" & n & "'"
      Case (SORT_DESCENDING + SORT_CASE_INSENSITIVE):
	 Tmp1 = Tmp1 + "Sort '" & Tmp & "' into '" & Tmp2 & "' in DSC and NS is '" & j & "' and records are '" & n & "'"
   End Select
   Tmp1 = Tmp1 & Chr$(13) & Chr$(13)
   cStartBasisTimer
   For i = 1 To ItemFile
      j = cFileSort(Tmp, Tmp2, SortMethod, -1, -1, -1, n)
      DoEvents
   Next i
   Tmp1 = Tmp1 & "speed for " & ItemFile & " = " & cReadBasisTimer() & " ms"
   Label3.Caption = Tmp1
End Sub
Sub TestFileSR ()
   Dim title      As String
   Dim Tmp        As String
   Dim Tmp1       As String
   Dim Tmp2       As String
   Dim Tmp3       As String
   Dim Tmp4       As String
   Dim i          As Integer
   Dim j          As Long
   Tmp1 = ""
   Tmp = "c:\autoexec.bat"
   Tmp2 = "c:\autoexec.tab"
   Tmp3 = "SET "
   Tmp4 = "rem SET "
   Tmp1 = Tmp1 & "File Copy " & Tmp & " to " & Tmp2 & " is " & cFileCopy(Tmp, Tmp2) & Chr$(13) & Chr$(13)
   Tmp1 = Tmp1 & "File Search-Replace (insensitive) : '" & Tmp3 & "' -> '" & Tmp4 & "' in '" & Tmp2 & "' is " & cFileSearchAndReplace(Tmp2, Tmp3, Tmp4, "c:\tmp.tmp", False) & Chr$(13) & Chr$(13)
   Tmp1 = Tmp1 & "File Search-Replace (sensitive) : '" & Tmp4 & "' -> '" & Tmp3 & "' in '" & Tmp2 & "' is " & cFileSearchAndReplace(Tmp2, Tmp4, Tmp3, "c:\tmp.tmp", True) & Chr$(13) & Chr$(13)
   Tmp1 = Tmp1 & "Compare file contents (insensitive) " & Tmp2 & " with " & Tmp & " is " & IIf(cCmpFileContents(Tmp2, Tmp, False) = True, "same", "not same") & Chr$(13) & Chr$(13)
   cStartBasisTimer
   For i = 1 To Item
      If ((i Mod 2) = 1) Then
	 j = cFileSearchAndReplace(Tmp2, Tmp3, Tmp4, "", True)
      Else
	 j = cFileSearchAndReplace(Tmp2, Tmp4, Tmp3, "", True)
      End If
   Next i
   Tmp1 = Tmp1 & "speed for " & Item & " = " & cReadBasisTimer() & " ms" & Chr$(13) & Chr$(13)
   Label3.Caption = Tmp1
End Sub
Sub TestFilesSize ()
   Dim title      As String
   Dim Tmp        As String
   Dim Tmp1       As String
   Dim Tmp2       As String
   Dim i          As Integer
   Dim j          As Integer
   Dim k          As Long
   Dim Size1      As Long
   Dim Size2      As Long
   Tmp1 = ""
   Tmp1 = Tmp1 & "Size of files c:\*.* is " & cFilesSize("c:\*.*") & Chr$(13)
   Tmp1 = Tmp1 & "Size of files c:\*.bat is " & cFilesSize("c:\*.bat") & Chr$(13)
   Tmp1 = Tmp1 & "Size of files c:\*.sys is " & cFilesSize("c:\*.sys") & Chr$(13)
   Tmp1 = Tmp1 & "Size of files c:\*.com is " & cFilesSize("c:\*.com") & Chr$(13)
   Tmp1 = Tmp1 & Chr$(13)
   Tmp1 = Tmp1 & "Size of files c:\*.* on disk is " & cFilesSizeOnDisk("c:\*.*") & Chr$(13)
   Tmp1 = Tmp1 & "Size of files c:\*.bat on disk is " & cFilesSizeOnDisk("c:\*.bat") & Chr$(13)
   Tmp1 = Tmp1 & "Size of files c:\*.sys on disk is " & cFilesSizeOnDisk("c:\*.sys") & Chr$(13)
   Tmp1 = Tmp1 & "Size of files c:\*.com on disk is " & cFilesSizeOnDisk("c:\*.com") & Chr$(13)
   Tmp1 = Tmp1 & Chr$(13)
   Tmp1 = Tmp1 & "Slack of files c:\*.* on disk is " & cFilesSlack("c:\*.*", Size1, Size2) & " %" & Chr$(13)
   Tmp1 = Tmp1 & "Slack of files c:\*.bat on disk is " & cFilesSlack("c:\*.bat", Size1, Size2) & " %" & Chr$(13)
   Tmp1 = Tmp1 & "Slack of files c:\*.sys on disk is " & cFilesSlack("c:\*.sys", Size1, Size2) & " %" & Chr$(13)
   Tmp1 = Tmp1 & "Slack of files c:\*.com on disk is " & cFilesSlack("c:\*.com", Size1, Size2) & " %" & Chr$(13)
   cStartBasisTimer
   For i = 1 To 10
      k = cFilesSize("c:\*.*")
   Next i
   Tmp1 = Tmp1 & "speed for " & 10 & " = " & cReadBasisTimer() & " ms"
   Label3.Caption = Tmp1
End Sub
Sub TestFileStatictics ()
   Dim title      As String
   Dim Tmp        As String
   Dim Tmp1       As String
   Dim Tmp2       As String
   Dim Tmp3       As String
   Dim Tmp4       As String
   Dim i          As Integer
   Dim j          As Long
   Dim nL         As Long
   Dim nW         As Long
   Dim nC         As Long
   Tmp1 = ""
   Tmp = "c:\autoexec.bat"
   Tmp1 = Tmp1 & "File statictics for '" & Tmp & "' is " & cFileStatistics(Tmp, nL, nW, nC) & Chr$(13)
   Tmp1 = Tmp1 & "number of lines : " & nL & Chr$(13)
   Tmp1 = Tmp1 & "number of words : " & nW & Chr$(13)
   Tmp1 = Tmp1 & "number of chars : " & nC & Chr$(13) & Chr$(13)
   Tmp = "c:\config.sys"
   Tmp1 = Tmp1 & "File statictics for '" & Tmp & "' is " & cFileStatistics(Tmp, nL, nW, nC) & Chr$(13)
   Tmp1 = Tmp1 & "number of lines : " & nL & Chr$(13)
   Tmp1 = Tmp1 & "number of words : " & nW & Chr$(13)
   Tmp1 = Tmp1 & "number of chars : " & nC & Chr$(13) & Chr$(13)
   cStartBasisTimer
   For i = 1 To Item
      j = cFileStatistics(Tmp, nL, nW, nC)
   Next i
   Tmp1 = Tmp1 & "speed for " & Item & " = " & cReadBasisTimer() & " ms" & Chr$(13) & Chr$(13)
   Label3.Caption = Tmp1
End Sub
Sub TestFileStatistic ()
   Dim title      As String
   Dim Tmp        As String
   Dim Tmp1       As String
   Dim Tmp2       As String
   Dim i          As Integer
   Dim j          As Integer
   Dim k          As Long
   Tmp1 = "File drive for time2win.dll is " & cFileDrive("time2win.dll") & Chr$(13) & Chr$(13)
   Tmp1 = Tmp1 & "File last time modified for time2win.dll is " & cFileLastTimeModified("time2win.dll") & Chr$(13) & Chr$(13)
   Tmp1 = Tmp1 & "File last date modified for time2win.dll is " & cFileLastDateModified("time2win.dll") & Chr$(13) & Chr$(13)
   cStartBasisTimer
   For i = 1 To ItemFile
      Tmp = cFileDrive("time2win.dll")
   Next i
   Tmp1 = Tmp1 & "speed for " & ItemFile & " = " & cReadBasisTimer() & " ms"
   Label3.Caption = Tmp1
End Sub
Sub TestFileToX ()
   Dim title      As String
   Dim Tmp        As String
   Dim Tmp1       As String
   Dim Tmp2       As String
   Dim Tmp3       As String
   Dim i          As Integer
   Dim j          As Long
   Tmp1 = ""
   Tmp = "c:\autoexec.bat"
   Tmp2 = "c:\autoexec.lwr"
   Tmp3 = "c:\autoexec.upr"
   Tmp1 = Tmp1 & "File to lower '" & Tmp & "' to '" & Tmp2 & "' is " & cFileToLower(Tmp, Tmp2) & Chr$(13) & Chr$(13)
   Tmp1 = Tmp1 & "File to upper '" & Tmp & "' to '" & Tmp3 & "' is " & cFileToUpper(Tmp, Tmp3) & Chr$(13) & Chr$(13)
   cStartBasisTimer
   For i = 1 To Item
      j = cFileToLower(Tmp, Tmp2)
   Next i
   Tmp1 = Tmp1 & "speed for " & Item & " = " & cReadBasisTimer() & " ms" & Chr$(13) & Chr$(13)
   Label3.Caption = Tmp1
End Sub
Sub TestFileUUCP ()
   Dim title      As String
   Dim Tmp        As String
   Dim Tmp1       As String
   Dim Tmp2       As String
   Dim Tmp3       As String
   Dim i          As Integer
   Dim j          As Long
   Tmp1 = ""
   Tmp = "c:\autoexec.bat"
   Tmp2 = "c:\autoexec.ue1"
   Tmp3 = "c:\autoexec.ud2"
   Tmp1 = Tmp1 & "File UUencode '" & Tmp & "' to '" & Tmp2 & "' is " & cFileUUCP(Tmp, Tmp2, MODE_UUENCODE) & Chr$(13)
   Tmp1 = Tmp1 & "File UUdecode '" & Tmp2 & "' to '" & Tmp3 & "' is " & cFileUUCP(Tmp2, Tmp3, MODE_UUDECODE) & Chr$(13)
   Tmp1 = Tmp1 & "Compare file contents (not sensitive) '" & Tmp & "' with '" & Tmp3 & "' is " & IIf(cCmpFileContents(Tmp, Tmp3, False) = -1, "same", "not same") & Chr$(13) & Chr$(13)
   cStartBasisTimer
   For i = 1 To Item
      j = cFileUUCP(Tmp, Tmp2, MODE_UUENCODE)
   Next i
   j = cFileUUCP(Tmp2, Tmp3, MODE_UUDECODE)
   Tmp1 = Tmp1 & "speed for " & Item & " = " & cReadBasisTimer() & " ms" & Chr$(13) & Chr$(13)
   Label3.Caption = Tmp1
End Sub
Sub TestFileVersion ()
   Dim title      As String
   Dim Tmp        As String
   Dim Tmp1       As String
   Dim Tmp2       As String
   Dim i          As Integer
   Dim j          As Integer
   Dim k          As Long
   Dim Status                 As Integer
   Tmp = cGetSystemDirectory() & "\krnl386.exe"
   Tmp1 = Tmp1 & "File Version for '" & Tmp & "' is " & Chr$(13)
   For i = VER_VERSION_PRODUCT To VER_PRODUCT_VERSION
      Tmp1 = Tmp1 & "   " & i & " = " & cGetFileVersion(Tmp, i) & Chr$(13)
   Next i
   Tmp = cGetSystemDirectory() & "\time2win.dll"
   Tmp1 = Tmp1 & "File Version for '" & Tmp & "' is " & Chr$(13)
   For i = VER_VERSION_PRODUCT To VER_PRODUCT_VERSION
      Tmp1 = Tmp1 & "   " & i & " = " & cGetFileVersion(Tmp, i) & Chr$(13)
   Next i
   cStartBasisTimer
   For i = 1 To ItemFile
      Tmp = cGetFileVersion(Tmp, -1)
   Next i
   Tmp1 = Tmp1 & "speed for " & ItemFile & " = " & cReadBasisTimer() & " ms"
   Label3.Caption = Tmp1
End Sub
Sub TestFileVersionInfo ()
   Dim title      As String
   Dim Tmp        As String
   Dim Tmp1       As String
   Dim Tmp2       As String
   Dim i          As Integer
   Dim j          As Integer
   Dim k          As Long
   Dim Status                 As Integer
   Dim FILEVERSIONINFO     As tagFILEVERSIONINFO
   Tmp = cGetSystemDirectory() & "\krnl386.exe"
   Tmp1 = Tmp1 & "File Version Information for '" & Tmp & "' is " & Chr$(13)
   Status = cGetFileVersionInfo(Tmp, FILEVERSIONINFO)
   Tmp1 = Tmp1 & "   VersionProduct = " & FILEVERSIONINFO.VersionProduct & Chr$(13)
   Tmp1 = Tmp1 & "   FileDescription = " & FILEVERSIONINFO.FileDescription & Chr$(13)
   Tmp1 = Tmp1 & "   FileVersion = " & FILEVERSIONINFO.FileVersion & Chr$(13)
   Tmp1 = Tmp1 & "   InternalName = " & FILEVERSIONINFO.InternalName & Chr$(13)
   Tmp1 = Tmp1 & "   LegalCopyright = " & FILEVERSIONINFO.LegalCopyright & Chr$(13)
   Tmp1 = Tmp1 & "   LegalTrademarks = " & FILEVERSIONINFO.LegalTrademarks & Chr$(13)
   Tmp1 = Tmp1 & "   Comments = " & FILEVERSIONINFO.Comments & Chr$(13)
   Tmp1 = Tmp1 & "   ProductName = " & FILEVERSIONINFO.ProductName & Chr$(13)
   Tmp1 = Tmp1 & "   ProductVersion = " & FILEVERSIONINFO.ProductVersion & Chr$(13) & Chr$(13)
   Tmp = cGetSystemDirectory() & "\time2win.dll"
   Tmp1 = Tmp1 & "File Version Information for '" & Tmp & "' is " & Chr$(13)
   Status = cGetFileVersionInfo(Tmp, FILEVERSIONINFO)
   Tmp1 = Tmp1 & "   VersionProduct = " & FILEVERSIONINFO.VersionProduct & Chr$(13)
   Tmp1 = Tmp1 & "   FileDescription = " & FILEVERSIONINFO.FileDescription & Chr$(13)
   Tmp1 = Tmp1 & "   FileVersion = " & FILEVERSIONINFO.FileVersion & Chr$(13)
   Tmp1 = Tmp1 & "   InternalName = " & FILEVERSIONINFO.InternalName & Chr$(13)
   Tmp1 = Tmp1 & "   LegalCopyright = " & FILEVERSIONINFO.LegalCopyright & Chr$(13)
   Tmp1 = Tmp1 & "   LegalTrademarks = " & FILEVERSIONINFO.LegalTrademarks & Chr$(13)
   Tmp1 = Tmp1 & "   Comments = " & FILEVERSIONINFO.Comments & Chr$(13)
   Tmp1 = Tmp1 & "   ProductName = " & FILEVERSIONINFO.ProductName & Chr$(13)
   Tmp1 = Tmp1 & "   ProductVersion = " & FILEVERSIONINFO.ProductVersion & Chr$(13) & Chr$(13)
   cStartBasisTimer
   For i = 1 To ItemFile
      Status = cGetFileVersionInfo(Tmp, FILEVERSIONINFO)
   Next i
   Tmp1 = Tmp1 & "speed for " & ItemFile & " = " & cReadBasisTimer() & " ms"
   Label3.Caption = Tmp1
End Sub
Sub TestFill ()
   Dim title      As String
   Dim Tmp        As String
   Dim Tmp1       As String
   Dim Tmp2       As String
   Dim i          As Integer
   Dim j          As Integer
   Tmp = Text1.Text
   title = "Fill of [" & Tmp & "] with [*=] is "
   Call cFill(Tmp, "*=")
   Tmp1 = title & Tmp & Chr$(13) & Chr$(13)
   cStartBasisTimer
   For i = 1 To Item
      Call cFill(Tmp, "=*")
   Next i
   Tmp1 = Tmp1 & "speed for " & Item & " = " & cReadBasisTimer() & " ms"
   Label3.Caption = Tmp1
End Sub
Sub TestFillI ()
   Dim title      As String
   Dim Tmp        As String
   Dim Tmp1       As String
   Dim Tmp2       As String
   Dim i          As Integer
   Dim j          As Integer
   Dim m          As Double
   ReDim array(ItemMean) As Integer
   Randomize Timer
   For i = LBound(array) To UBound(array)
      array(i) = 0
      List1.AddItem "" & array(i)
   Next i
   j = cFillI(array(), 1)
   For i = LBound(array) To UBound(array)
      List2.AddItem "" & array(i)
   Next i
   Tmp1 = Tmp1 & "Fill 1 to element 1 of an integer array is : " & array(1) & Chr$(13) & Chr$(13)
   Tmp1 = Tmp1 & "Fill 1 to element " & ItemMean & " of an integer array is : " & array(ItemMean) & Chr$(13) & Chr$(13)
   cStartBasisTimer
   For i = 1 To ItemFile
      j = cFillI(array(), 1)
   Next i
   Tmp1 = Tmp1 & "speed for " & ItemFile & " = " & cReadBasisTimer() & " ms"
   Label3.Caption = Tmp1
End Sub
Sub TestFillIncrI ()
   Dim title      As String
   Dim Tmp        As String
   Dim Tmp1       As String
   Dim Tmp2       As String
   Dim i          As Integer
   Dim j          As Integer
   Dim m          As Double
   ReDim array(ItemMean) As Integer
   Randomize Timer
   For i = LBound(array) To UBound(array)
      array(i) = 0
      List1.AddItem "" & array(i)
   Next i
   j = cFillIncrI(array(), -2, 3)
   For i = LBound(array) To UBound(array)
      List2.AddItem "" & array(i)
   Next i
   Tmp1 = Tmp1 & "Fill -2 by increment 3 to element 1 of an integer array is : " & array(1) & Chr$(13) & Chr$(13)
   Tmp1 = Tmp1 & "Fill -2 by increment 3 to element " & ItemMean & " of an integer array is : " & array(ItemMean) & Chr$(13) & Chr$(13)
   cStartBasisTimer
   For i = 1 To ItemFile
      j = cFillIncrI(array(), 1, 3)
   Next i
   Tmp1 = Tmp1 & "speed for " & ItemFile & " = " & cReadBasisTimer() & " ms"
   Label3.Caption = Tmp1
End Sub
Sub TestFilterBlocks ()
   Dim title      As String
   Dim Tmp        As String
   Dim Tmp1       As String
   Dim Tmp2       As String
   Dim i          As Integer
   Dim j          As Integer
   Tmp = Text1.Text
   title = "Filter blocks between '/' and '/' in [" & Tmp & "] is " & Chr$(13) & Chr$(13)
   Tmp1 = title & cFilterBlocks(Tmp, "//") & Chr$(13) & Chr$(13)
   title = "Filter blocks between 'B' and 'I' in [" & Tmp & "] is " & Chr$(13) & Chr$(13)
   Tmp1 = Tmp1 & title & cFilterBlocks(Tmp, "BI") & Chr$(13) & Chr$(13)
   cStartBasisTimer
   For i = 1 To Item
      Tmp2 = cFilterBlocks(Tmp, "//")
   Next i
   Tmp1 = Tmp1 & "speed for " & Item & " = " & cReadBasisTimer() & " ms"
   Label3.Caption = Tmp1
End Sub
Sub TestFilterChars ()
   Dim title      As String
   Dim Tmp        As String
   Dim Tmp1       As String
   Dim Tmp2       As String
   Dim i          As Integer
   Dim j          As Integer
   Tmp = Text1.Text
   title = "Filter 'B','/' in [" & Tmp & "] is "
   Tmp1 = title & cFilterChars(Tmp, "B/") & Chr$(13) & Chr$(13)
   cStartBasisTimer
   For i = 1 To Item
      Tmp2 = cFilterChars(Tmp, "B/")
   Next i
   Tmp1 = Tmp1 & "speed for " & Item & " = " & cReadBasisTimer() & " ms"
   Label3.Caption = Tmp1
End Sub
Sub TestFindBitReset ()
   Dim title      As String
   Dim Tmp        As String
   Dim Tmp1       As String
   Dim Tmp2       As String
   Dim i          As Integer
   Dim j          As Integer
   Tmp = Text1.Text
   Tmp1 = "The following bits on '" & Tmp & "' are not Set (False) " & Chr$(13) & Chr$(13)
   j = True
   Do
      j = cFindBitReset(Tmp, j)
      If (j <> True) Then Tmp1 = Tmp1 & j & ", "
   Loop Until (j = True)
   Tmp1 = Left$(Tmp1, Len(Tmp1) - 1)
   Tmp1 = Tmp1 & Chr$(13) & Chr$(13)
   j = 0
   cStartBasisTimer
   For i = 1 To Item
      j = cFindBitReset(Tmp, j)
   Next i
   Tmp1 = Tmp1 & "speed for " & Item & " = " & cReadBasisTimer() & " ms"
   Label3.Caption = Tmp1
End Sub
Sub TestFindBitSet ()
   Dim title      As String
   Dim Tmp        As String
   Dim Tmp1       As String
   Dim Tmp2       As String
   Dim i          As Integer
   Dim j          As Integer
   Tmp = Text1.Text
   Tmp1 = "The following bits on '" & Tmp & "' are Set (True) " & Chr$(13) & Chr$(13)
   j = True
   Do
      j = cFindBitSet(Tmp, j)
      If (j <> True) Then Tmp1 = Tmp1 & j & ", "
   Loop Until (j = True)
   Tmp1 = Left$(Tmp1, Len(Tmp1) - 1)
   Tmp1 = Tmp1 & Chr$(13) & Chr$(13)
   j = 0
   cStartBasisTimer
   For i = 1 To Item
      j = cFindBitSet(Tmp, j)
   Next i
   Tmp1 = Tmp1 & "speed for " & Item & " = " & cReadBasisTimer() & " ms"
   Label3.Caption = Tmp1
End Sub
Sub TestFindFileInEnv ()
   Dim title      As String
   Dim Tmp        As String
   Dim Tmp1       As String
   Dim Tmp2       As String
   Dim i          As Integer
   Dim j          As Integer
   j = cFindFileInEnv("win.com", "windir")
   Tmp1 = "The file 'win.com' is " & IIf(j, "found", "not found") & " in the WINDIR" & Chr$(13) & Chr$(13)
   cStartBasisTimer
   For i = 1 To ItemFile
      j = cFindFileInEnv("win.com", "windir")
   Next i
   Tmp1 = Tmp1 & "speed for " & ItemFile & " = " & cReadBasisTimer() & " ms"
   Label3.Caption = Tmp1
End Sub
Sub TestFindFileInPath ()
   Dim title      As String
   Dim Tmp        As String
   Dim Tmp1       As String
   Dim Tmp2       As String
   Dim i          As Integer
   Dim j          As Integer
   j = cFindFileInPath("win.com")
   Tmp1 = "The file 'win.com' is " & IIf(j, "found", "not found") & " in the PATH" & Chr$(13) & Chr$(13)
   cStartBasisTimer
   For i = 1 To ItemFile
      j = cFindFileInPath("win.com")
   Next i
   Tmp1 = Tmp1 & "speed for " & ItemFile & " = " & cReadBasisTimer() & " ms"
   Label3.Caption = Tmp1
End Sub
Sub TestFloppyInfo ()
   Dim title      As String
   Dim Tmp        As String
   Dim Tmp1       As String
   Dim Tmp2       As String
   Dim i          As Integer
   Dim j          As Integer
   Dim nHds       As Integer
   Dim nCyls      As Integer
   Dim nSecs      As Integer
   Tmp1 = ""
   For i = 1 To 3
      j = cFloppyInfo(Chr$(64 + i), nHds, nCyls, nSecs)
      Tmp1 = Tmp1 & "'" & Chr$(64 + i) & ":' is " & j & " (" & nHds & "," & nCyls & "," & nSecs & ")" & Chr$(13)
   Next i
   Tmp1 = Tmp1 + Chr$(13)
   cStartBasisTimer
   For i = 1 To Item
      j = cFloppyInfo("A", nHds, nCyls, nSecs)
   Next i
   Tmp1 = Tmp1 & "speed for " & Item & " = " & cReadBasisTimer() & " ms"
   Label3.Caption = Tmp1
End Sub
Sub TestFraction ()
   Dim title      As String
   Dim Tmp        As String
   Dim Tmp1       As String
   Dim Tmp2       As String
   Dim i          As Integer
   Dim v          As Double
   Dim n          As Double
   Dim p          As Double
   Dim q          As Double
   Dim e          As Integer
   Tmp1 = "Determining fraction part (numerator/denominator) for the following value " & Chr$(13) & Chr$(13)
   n = .75
   v = cFraction(n, p, q)
   Tmp1 = Tmp1 & n & " is " & p & " / " & q & Chr$(13)
   Tmp1 = Tmp1 & "   value is " & v & Chr$(13) & Chr$(13)
   n = 4.12
   v = cFraction(n, p, q)
   Tmp1 = Tmp1 & n & " is " & p & " / " & q & Chr$(13)
   Tmp1 = Tmp1 & "   value is " & v & Chr$(13) & Chr$(13)
   n = 365.25
   v = cFraction(n, p, q)
   Tmp1 = Tmp1 & n & " is " & p & " / " & q & Chr$(13)
   Tmp1 = Tmp1 & "   value is " & v & Chr$(13) & Chr$(13)
   n = 3.14
   v = cFraction(n, p, q)
   Tmp1 = Tmp1 & n & " is " & p & " / " & q & Chr$(13)
   Tmp1 = Tmp1 & "   value is " & v & Chr$(13) & Chr$(13)
   n = 3.14159
   v = cFraction(n, p, q)
   Tmp1 = Tmp1 & n & " is " & p & " / " & q & Chr$(13)
   Tmp1 = Tmp1 & "   value is " & v & Chr$(13) & Chr$(13)
   n = 3.14159265
   v = cFraction(n, p, q)
   Tmp1 = Tmp1 & n & " is " & p & " / " & q & Chr$(13)
   Tmp1 = Tmp1 & "   value is " & v & Chr$(13) & Chr$(13)
   n = .9999999
   v = cFraction(n, p, q)
   Tmp1 = Tmp1 & n & " is " & p & " / " & q & Chr$(13)
   Tmp1 = Tmp1 & "   value is " & v & Chr$(13) & Chr$(13)
   cStartBasisTimer
   For i = 1 To Item
      v = cFraction(n, p, q)
   Next i
   Tmp1 = Tmp1 & "speed for " & Item & " = " & cReadBasisTimer() & " ms"
   Label3.Caption = Tmp1
End Sub
Sub TestFullPath ()
   Dim title      As String
   Dim Tmp        As String
   Dim Tmp1       As String
   Dim Tmp2       As String
   Dim Tmp3       As String
   Dim i          As Integer
   Dim j          As Long
   Tmp1 = ""
   Tmp = "C:\AUTOEXEC.BAT"
   Tmp1 = Tmp1 & "Full Path of " & Tmp & " is " & cFullPath(Tmp) & Chr$(13) & Chr$(13)
   Tmp = cGetSystemDirectory() & "\TIME2WIN.DLL"
   Tmp1 = Tmp1 & "Full Path of " & Tmp & " is " & cFullPath(Tmp) & Chr$(13) & Chr$(13)
   Tmp = cFilesInDirectory(cGetDefaultCurrentDir() + "\*.*", True)
   Tmp1 = Tmp1 & "Full Path of " & Tmp & " is " & cFullPath(Tmp) & Chr$(13) & Chr$(13)
   cStartBasisTimer
   For i = 1 To Item
      Tmp = cFullPath(Tmp)
   Next i
   Tmp1 = Tmp1 & "speed for " & Item & " = " & cReadBasisTimer() & " ms" & Chr$(13) & Chr$(13)
   Label3.Caption = Tmp1
End Sub
Sub TestGetBit ()
   Dim title      As String
   Dim Tmp        As String
   Dim Tmp1       As String
   Dim Tmp2       As String
   Dim i          As Integer
   Dim j          As Integer
   Tmp = Text1.Text
   title = "bit 0,7,3 of [" & Tmp & "] is "
   Tmp1 = title & cGetBit(Tmp, 0) & " " & cGetBit(Tmp, 7) & " " & cGetBit(Tmp, 3) & " " & Chr$(13) & Chr$(13)
   title = "bit 23,30,38 of [" & Tmp & "] is "
   Tmp1 = Tmp1 & title & cGetBit(Tmp, 23) & " " & cGetBit(Tmp, 30) & " " & cGetBit(Tmp, 38) & " " & Chr$(13) & Chr$(13)
   cStartBasisTimer
   For i = 1 To Item
      j = cGetBit(Tmp, i)
   Next i
   Tmp1 = Tmp1 & "speed for " & Item & " = " & cReadBasisTimer() & " ms"
   Label3.Caption = Tmp1
End Sub
Sub TestGetBitValue ()
   Dim intResult        As Integer
   Dim strResult        As String
   Dim strDisplay       As String
   Dim iData            As Integer
   Dim lData            As Long
   Dim sData            As Single
   Dim dData            As Double
   Dim i                As Integer
   intResult = 0
   strResult = ""
   strDisplay = ""
   Call cRndInit(-1)
   iData = Abs(cRndI())
   lData = Abs(cRndL())
   sData = Abs(cRndS())
   dData = Abs(cRndD())
     
   strDisplay = strDisplay + "Integer value : " & iData & " (" & cToBinary(cMKI(iData)) & ")" & Chr$(13)
   strDisplay = strDisplay + "   bit 0 is " & IIf(cGetBitI(iData, 0), "set", "reset") & Chr$(13)
   strDisplay = strDisplay + "   bit 3 is " & IIf(cGetBitI(iData, 3), "set", "reset") & Chr$(13)
   strDisplay = strDisplay + "   bit 7 is " & IIf(cGetBitI(iData, 7), "set", "reset") & Chr$(13)
   strDisplay = strDisplay + "   bit 11 is " & IIf(cGetBitI(iData, 11), "set", "reset") & Chr$(13)
   strDisplay = strDisplay + "   bit 15 is " & IIf(cGetBitI(iData, 15), "set", "reset") & Chr$(13) & Chr$(13)
   strDisplay = strDisplay + "Long value : " & lData & " (" & cToBinary(cMKL(lData)) & ")" & Chr$(13)
   strDisplay = strDisplay + "   bit 0 is " & IIf(cGetBitL(lData, 0), "set", "reset") & Chr$(13)
   strDisplay = strDisplay + "   bit 5 is " & IIf(cGetBitL(lData, 5), "set", "reset") & Chr$(13)
   strDisplay = strDisplay + "   bit 10 is " & IIf(cGetBitL(lData, 10), "set", "reset") & Chr$(13)
   strDisplay = strDisplay + "   bit 15 is " & IIf(cGetBitL(lData, 15), "set", "reset") & Chr$(13)
   strDisplay = strDisplay + "   bit 20 is " & IIf(cGetBitL(lData, 20), "set", "reset") & Chr$(13) & Chr$(13)
   strDisplay = strDisplay + "Single value : " & sData & " (" & cToBinary(cMKS(sData)) & ")" & Chr$(13)
   strDisplay = strDisplay + "   bit 0 is " & IIf(cGetBitS(sData, 0), "set", "reset") & Chr$(13)
   strDisplay = strDisplay + "   bit 5 is " & IIf(cGetBitS(sData, 5), "set", "reset") & Chr$(13)
   strDisplay = strDisplay + "   bit 10 is " & IIf(cGetBitS(sData, 10), "set", "reset") & Chr$(13)
   strDisplay = strDisplay + "   bit 15 is " & IIf(cGetBitS(sData, 15), "set", "reset") & Chr$(13)
   strDisplay = strDisplay + "   bit 20 is " & IIf(cGetBitS(sData, 20), "set", "reset") & Chr$(13) & Chr$(13)
   strDisplay = strDisplay + "Double value : " & dData & " (" & cToBinary(cMKD(dData)) & ")" & Chr$(13)
   strDisplay = strDisplay + "   bit 0 is " & IIf(cGetBitD(dData, 0), "set", "reset") & Chr$(13)
   strDisplay = strDisplay + "   bit 10 is " & IIf(cGetBitD(dData, 10), "set", "reset") & Chr$(13)
   strDisplay = strDisplay + "   bit 20 is " & IIf(cGetBitD(dData, 20), "set", "reset") & Chr$(13)
   strDisplay = strDisplay + "   bit 30 is " & IIf(cGetBitD(dData, 30), "set", "reset") & Chr$(13)
   strDisplay = strDisplay + "   bit 40 is " & IIf(cGetBitD(dData, 40), "set", "reset") & Chr$(13) & Chr$(13)
   'time the function
   cStartBasisTimer
   For i = 1 To ItemFile
      intResult = cGetBitI(iData, i)
   Next i
   strDisplay = strDisplay & "speed for " & ItemFile & " = " & cReadBasisTimer() & " ms"
   Label3.Caption = strDisplay
End Sub
Sub TestGetBlock ()
   Dim title      As String
   Dim Tmp        As String
   Dim Tmp1       As String
   Dim Tmp2       As String
   Dim i          As Integer
   Dim j          As Integer
   Tmp = Text1.Text
   title = "The 2,4,1 of 2 chars of [" & Tmp & "] are "
   Tmp = Text1.Text
   Tmp1 = title & "2:" & cGetBlock(Tmp, 2, 2) & " | 4:" & cGetBlock(Tmp, 4, 2) & " | 1:" & cGetBlock(Tmp, 1, 2) & Chr$(13) & Chr$(13)
   cStartBasisTimer
   For i = 1 To Item
      Tmp2 = cGetBlock(Tmp, 1, 2)
   Next i
   Tmp1 = Tmp1 & "speed for " & Item & " = " & cReadBasisTimer() & " ms"
   Label3.Caption = Tmp1
End Sub
Sub TestGetCurrentDrive ()
   Dim title      As String
   Dim Tmp        As String
   Dim Tmp1       As String
   Dim Tmp2       As String
   Dim i          As Integer
   Dim j          As Integer
   Tmp = cGetCurrentDrive()
   Tmp1 = Tmp & " is the current drive" & Chr$(13) & Chr$(13)
   cStartBasisTimer
   For i = 1 To Item
      Tmp2 = cGetCurrentDrive()
      If (Tmp <> Tmp2) Then Beep
   Next i
   Tmp1 = Tmp1 & "speed for " & Item & " = " & cReadBasisTimer() & " ms"
   Label3.Caption = Tmp1
End Sub
Sub TestGetDateSeparator ()
   Dim title      As String
   Dim Tmp        As String
   Dim Tmp1       As String
   Dim Tmp2       As String
   Dim i          As Integer
   Dim j          As Integer
   Tmp = cGetDateSeparator()
   Tmp1 = "The following char '" & Tmp & "' is the date separator" & Chr$(13) & Chr$(13)
   cStartBasisTimer
   For i = 1 To Item
      Tmp2 = cGetDateSeparator()
      If (Tmp <> Tmp2) Then Beep
   Next i
   Tmp1 = Tmp1 & "speed for " & Item & " = " & cReadBasisTimer() & " ms"
   Label3.Caption = Tmp1
End Sub
Sub TestGetDefaultCurrentDir ()
   Dim title      As String
   Dim Tmp        As String
   Dim Tmp1       As String
   Dim Tmp2       As String
   Dim i          As Integer
   Dim j          As Integer
   Tmp = cGetDefaultCurrentDir()
   Tmp1 = Tmp & " is the current dir on the default drive" & Chr$(13) & Chr$(13)
   cStartBasisTimer
   For i = 1 To Item
      Tmp2 = cGetDefaultCurrentDir()
      If (Tmp <> Tmp2) Then Beep
   Next i
   Tmp1 = Tmp1 & "speed for " & Item & " = " & cReadBasisTimer() & " ms"
   Label3.Caption = Tmp1
End Sub
Sub TestGetDiskFree ()
   Dim title      As String
   Dim Tmp        As String
   Dim Tmp1       As String
   Dim Tmp2       As String
   Dim i          As Integer
   Dim j          As Integer
   Dim k          As Long
   Dim ErrCode    As Integer
   Tmp1 = ""
   For i = 1 To 26
      k = cGetDiskFree(Chr$(64 + i))
      If (k <> True) Then
	 Tmp1 = Tmp1 & "DiskFree for '" & Chr$(64 + i) & ":' is " & k & Chr$(13)
      End If
   Next i
   Tmp1 = Tmp1 + Chr$(13)
   cStartBasisTimer
   For i = 1 To Item
      k = cGetDiskFree("C")
   Next i
   Tmp1 = Tmp1 & "speed for " & Item & " = " & cReadBasisTimer() & " ms"
   Label3.Caption = Tmp1
End Sub
Sub TestGetDiskSpace ()
   Dim title      As String
   Dim Tmp        As String
   Dim Tmp1       As String
   Dim Tmp2       As String
   Dim i          As Integer
   Dim j          As Integer
   Dim k          As Long
   Dim ErrCode    As Integer
   Tmp1 = ""
   For i = 1 To 26
      k = cGetDiskSpace(Chr$(64 + i))
      If (k <> True) Then
	 Tmp1 = Tmp1 & "DiskSpace for '" & Chr$(64 + i) & ":' is " & k & Chr$(13)
      End If
   Next i
   Tmp1 = Tmp1 + Chr$(13)
   cStartBasisTimer
   For i = 1 To Item
      k = cGetDiskSpace("C")
   Next i
   Tmp1 = Tmp1 & "speed for " & Item & " = " & cReadBasisTimer() & " ms"
   Label3.Caption = Tmp1
End Sub
Sub TestGetDiskUsed ()
   Dim title      As String
   Dim Tmp        As String
   Dim Tmp1       As String
   Dim Tmp2       As String
   Dim i          As Integer
   Dim j          As Integer
   Dim k          As Long
   Dim ErrCode    As Integer
   Tmp1 = ""
   For i = 1 To 26
      k = cGetDiskUsed(Chr$(64 + i))
      If (k <> True) Then
	 Tmp1 = Tmp1 & "DiskUsed for '" & Chr$(64 + i) & ":' is " & k & Chr$(13)
      End If
   Next i
   Tmp1 = Tmp1 + Chr$(13)
   cStartBasisTimer
   For i = 1 To Item
      k = cGetDiskUsed("C")
   Next i
   Tmp1 = Tmp1 & "speed for " & Item & " = " & cReadBasisTimer() & " ms"
   Label3.Caption = Tmp1
End Sub
Sub TestGetDriveCurrentDir ()
   Dim title      As String
   Dim Tmp        As String
   Dim Tmp1       As String
   Dim Tmp2       As String
   Dim i          As Integer
   Dim j          As Integer
   Tmp1 = ""
   For i = 1 To 26
      Tmp = cGetDriveCurrentDir(Chr$(64 + i))
      If (Tmp <> "") Then
	 Tmp1 = Tmp1 & "The current directory in '" & Chr$(64 + i) & ":' is " & Tmp & Chr$(13)
      Else
	 If (i = 1) Then Tmp1 = Tmp1 & "drive A: is missing" & Chr$(13)
	 If (i = 2) Then Tmp1 = Tmp1 & "drive B: is missing" & Chr$(13)
      End If
   Next i
   Tmp1 = Tmp1 + Chr$(13)
   cStartBasisTimer
   For i = 1 To Item
      Tmp2 = cGetDriveCurrentDir("C")
   Next i
   Tmp1 = Tmp1 & "speed for " & Item & " = " & cReadBasisTimer() & " ms"
   Label3.Caption = Tmp1
End Sub
Sub TestGetFullnameInEnv ()
   Dim title      As String
   Dim Tmp        As String
   Dim Tmp1       As String
   Dim Tmp2       As String
   Dim i          As Integer
   Dim j          As Integer
   Tmp = cGetFullNameInEnv("win.com", "windir")
   Tmp1 = "Full path for 'win.com' in 'windir' is " & Tmp & Chr$(13) & Chr$(13)
   cStartBasisTimer
   For i = 1 To ItemFile
      Tmp2 = cGetFullNameInEnv("win.com", "windir")
   Next i
   Tmp1 = Tmp1 & "speed for " & ItemFile & " = " & cReadBasisTimer() & " ms"
   Label3.Caption = Tmp1
End Sub
Sub TestGetFullnameInPath ()
   Dim title      As String
   Dim Tmp        As String
   Dim Tmp1       As String
   Dim Tmp2       As String
   Dim i          As Integer
   Dim j          As Integer
   Tmp = cGetFullNameInPath("win.com")
   Tmp1 = "Full path for 'win.com' is " & Tmp & Chr$(13) & Chr$(13)
   cStartBasisTimer
   For i = 1 To ItemFile
      Tmp2 = cGetFullNameInPath("win.com")
   Next i
   Tmp1 = Tmp1 & "speed for " & ItemFile & " = " & cReadBasisTimer() & " ms"
   Label3.Caption = Tmp1
End Sub
Sub TestGetIn ()
   Dim title      As String
   Dim Tmp        As String
   Dim Tmp1       As String
   Dim Tmp2       As String
   Dim i          As Integer
   Dim j          As Integer
   Tmp = Text1.Text
   title = "The 2,4,1 blocks of [" & Tmp & "] are "
   Tmp = Text1.Text
   Tmp1 = title & "2:" & cGetIn(Tmp, "/", 2) & " | 4:" & cGetIn(Tmp, "/", 4) & " | 1:" & cGetIn(Tmp, "/", 1) & Chr$(13) & Chr$(13)
   cStartBasisTimer
   For i = 1 To Item
      Tmp2 = cGetIn(Tmp, "/", 2)
   Next i
   Tmp1 = Tmp1 & "speed for " & Item & " = " & cReadBasisTimer() & " ms"
   Label3.Caption = Tmp1
End Sub
Sub TestGetInR ()
	      
   Dim title      As String
   Dim Tmp        As String
   Dim Tmp1       As String
   Dim Tmp2       As String
   Dim i          As Integer
   Dim j          As Integer
   Tmp = Text1.Text
   Tmp1 = Tmp1 + "GetInR" & Chr$(13)
   Tmp1 = Tmp1 + "The 2,4,1 blocks from the right of [" & Tmp & "] are "
   Tmp1 = Tmp1 & "2:" & cGetInR(Tmp, "/", 2) & " | 4:" & cGetInR(Tmp, "/", 4) & " | 1:" & cGetInR(Tmp, "/", 1) & Chr$(13) & Chr$(13)
   Tmp1 = Tmp1 + "GetInPart" & Chr$(13)
   Tmp1 = Tmp1 + "The first and the second part from the left of [" & Tmp & "] are " & Chr$(13)
   Tmp1 = Tmp1 & cGetInPart(Tmp, "/", True) & " | " & cGetInPart(Tmp, "/", False) & Chr$(13) & Chr$(13)
   Tmp1 = Tmp1 + "GetInPartR" & Chr$(13)
   Tmp1 = Tmp1 + "The first and the second part from the right of [" & Tmp & "] are " & Chr$(13)
   Tmp1 = Tmp1 & cGetInPartR(Tmp, "/", True) & " | " & cGetInPartR(Tmp, "/", False) & Chr$(13) & Chr$(13)
   Tmp = UCase$("c:\vberr.hnd\source.mak\vbtrcprf.mak")
   Tmp1 = Tmp1 + "GetInPart" & Chr$(13)
   Tmp1 = Tmp1 + "The first and the second part from the left of [" & Tmp & "] are " & Chr$(13)
   Tmp1 = Tmp1 & cGetInPart(Tmp, ".", True) & " | " & cGetInPart(Tmp, ".", False) & Chr$(13) & Chr$(13)
   Tmp1 = Tmp1 + "GetInPartR" & Chr$(13)
   Tmp1 = Tmp1 + "The first and the second part from the right of [" & Tmp & "] are " & Chr$(13)
   Tmp1 = Tmp1 & cGetInPartR(Tmp, ".", True) & " | " & cGetInPartR(Tmp, ".", False) & Chr$(13) & Chr$(13)
   cStartBasisTimer
   For i = 1 To Item
      Tmp2 = cGetInR(Tmp, "/", 2)
   Next i
   Tmp1 = Tmp1 & "speed for " & Item & " = " & cReadBasisTimer() & " ms"
   Label3.Caption = Tmp1
End Sub
Sub TestGetNetConnection ()
   Dim title      As String
   Dim Tmp        As String
   Dim Tmp1       As String
   Dim Tmp2       As String
   Dim i          As Integer
   Dim j          As Integer
   Dim ErrCode    As Integer
   Tmp1 = ""
   For i = 1 To 26
      Tmp = cGetNetConnection(Chr$(64 + i) & ":", ErrCode)
      If (ErrCode = True) Then
	 Tmp1 = Tmp1 & "'" & Chr$(64 + i) & ":' is " & Tmp & Chr$(13)
      End If
   Next i
   For i = 1 To 3
      Tmp = cGetNetConnection("LPT" & i & ":", ErrCode)
      If (ErrCode = True) Then
	 Tmp1 = Tmp1 & "'LPT" & i & ":' is " & Tmp & Chr$(13)
      End If
   Next i
   Tmp1 = Tmp1 + Chr$(13)
   cStartBasisTimer
   For i = 1 To ItemFile
      Tmp = cGetNetConnection("C", ErrCode)
   Next i
   Tmp1 = Tmp1 & "speed for " & ItemFile & " = " & cReadBasisTimer() & " ms"
   Label3.Caption = Tmp1
End Sub
Sub TestGetSystemDirectory ()
   Dim title      As String
   Dim Tmp        As String
   Dim Tmp1       As String
   Dim Tmp2       As String
   Dim i          As Integer
   Dim j          As Integer
   Tmp = cGetSystemDirectory()
   Tmp1 = Tmp & " is the system directory for Windows" & Chr$(13) & Chr$(13)
   cStartBasisTimer
   For i = 1 To Item
      Tmp2 = cGetSystemDirectory()
      If (Tmp <> Tmp2) Then Beep
   Next i
   Tmp1 = Tmp1 & "speed for " & Item & " = " & cReadBasisTimer() & " ms"
   Label3.Caption = Tmp1
End Sub
Sub TestGetTimeSeparator ()
   Dim title      As String
   Dim Tmp        As String
   Dim Tmp1       As String
   Dim Tmp2       As String
   Dim i          As Integer
   Dim j          As Integer
   Tmp = cGetTimeSeparator()
   Tmp1 = "The following char '" & Tmp & "' is the time separator" & Chr$(13) & Chr$(13)
   cStartBasisTimer
   For i = 1 To Item
      Tmp2 = cGetTimeSeparator()
      If (Tmp <> Tmp2) Then Beep
   Next i
   Tmp1 = Tmp1 & "speed for " & Item & " = " & cReadBasisTimer() & " ms"
   Label3.Caption = Tmp1
End Sub
Sub TestGetWindowsDirectory ()
   Dim title      As String
   Dim Tmp        As String
   Dim Tmp1       As String
   Dim Tmp2       As String
   Dim i          As Integer
   Dim j          As Integer
   Tmp = cGetWindowsDirectory()
   Tmp1 = Tmp & " is the directory for Windows" & Chr$(13) & Chr$(13)
   cStartBasisTimer
   For i = 1 To Item
      Tmp2 = cGetWindowsDirectory()
      If (Tmp <> Tmp2) Then Beep
   Next i
   Tmp1 = Tmp1 & "speed for " & Item & " = " & cReadBasisTimer() & " ms"
   Label3.Caption = Tmp1
End Sub
Sub TestGiveBitPalindrome ()
   Dim title      As String
   Dim Tmp        As String
   Dim Tmp1       As String
   Dim Tmp2       As String
   Dim i          As Integer
   Dim j          As Integer
   title = "The followings chars are Bit Palindrome : " & Chr$(13) & Chr$(13)
   Tmp1 = Tmp1 & title & "chr(0) and  " & cBlockCharFromRight(cGiveBitPalindrome(), 1) & Chr$(13) & Chr$(13)
   cStartBasisTimer
   For i = 1 To Item
      Tmp2 = cGiveBitPalindrome()
   Next i
   Tmp1 = Tmp1 & "speed for " & Item & " = " & cReadBasisTimer() & " ms"
   Label3.Caption = Tmp1
End Sub
Sub TestGZIP ()
   Dim title      As String
   Dim Tmp        As String
   Dim Tmp1       As String
   Dim Tmp2       As String
   Dim Tmp3       As String
   Dim i          As Integer
   Dim j          As Long
   Tmp1 = ""
   Tmp = "c:\autoexec.bat"
   Tmp2 = "c:\autoexec.tb1"
   Tmp3 = "c:\autoexec.tb2"
   Tmp1 = Tmp1 & "GZIP File Compress '" & Tmp & "' to '" & Tmp2 & "' is " & cGZIPFileCompress(Tmp, Tmp2) & Chr$(13)
   Tmp1 = Tmp1 & "GZIP File Expand '" & Tmp2 & "' to '" & Tmp3 & "' is " & cGZIPFileExpand(Tmp2, Tmp3) & Chr$(13)
   Tmp1 = Tmp1 & "Compare file contents (not sensitive) '" & Tmp & "' with '" & Tmp3 & "' is " & IIf(cCmpFileContents(Tmp, Tmp3, False) = -1, "same", "not same") & Chr$(13) & Chr$(13)
   cStartBasisTimer
   For i = 1 To Item
      j = cGZIPFileCompress(Tmp, Tmp2)
   Next i
   j = cGZIPFileExpand(Tmp2, Tmp3)
   Tmp1 = Tmp1 & "speed for " & Item & " = " & cReadBasisTimer() & " ms" & Chr$(13) & Chr$(13)
   Label3.Caption = Tmp1
End Sub
Sub TestGZIPStringCompress ()
   Dim title      As String
   Dim Tmp        As String
   Dim Tmp1       As String
   Dim Tmp2       As String
   Dim Tmp3       As String
   Dim i          As Integer
   Dim j          As Long
   Tmp1 = ""
   Tmp = "TIME TO WIN, TIME TO WIN, TIME TO WIN, TIME TO WIN"
   Tmp2 = cGZIPStringCompress(Tmp)
   Tmp3 = cGZIPStringExpand(Tmp2)
   Tmp1 = Tmp1 & "String Compress '" & Tmp & "' is " & Format$(Len(Tmp)) & " to " & Format$(Len(Tmp2)) & " bytes." & Chr$(13)
   Tmp1 = Tmp1 & "String Expand is '" & Tmp3 & "'" & Chr$(13)
   Tmp1 = Tmp1 & "Compare string contents (not sensitive) is " & IIf(LCase$(Tmp) = LCase$(Tmp3), "same", "not same") & Chr$(13) & Chr$(13)
   cStartBasisTimer
   For i = 1 To Item
      Tmp2 = cGZIPStringCompress(Tmp)
   Next i
   Tmp3 = cGZIPStringExpand(Tmp2)
   Tmp1 = Tmp1 & "speed for " & Item & " = " & cReadBasisTimer() & " ms" & Chr$(13) & Chr$(13)
   Label3.Caption = Tmp1
End Sub
Sub TestHideAllEditForm ()
   Dim n       As Integer
   Dim Tmp     As String
   If (cHideAllEditForm() = True) Then
      Tmp = "HideAllEditForm SUCCESS"
   Else
      Tmp = "HideAllEditForm FAIL"
   End If
   Tmp = Tmp & Chr$(13) & "Waiting 2 seconds" & Chr$(13)
   Label3.Caption = Tmp
   DoEvents
   n = cSleep(2000)
   If (cUnHideAllEditForm() = True) Then
      Tmp = Tmp & "UnHideAllEditForm SUCCESS"
   Else
      Tmp = Tmp & "UnHideAllEditForm FAIL"
   End If
   Label3.Caption = Tmp
End Sub
Sub TestHideDebugForm ()
   Dim n       As Integer
   Dim Tmp     As String
   If (cHideDebugForm() = True) Then
      Tmp = "HideDebugForm SUCCESS"
   Else
      Tmp = "HideDebugForm FAIL"
   End If
   Tmp = Tmp & Chr$(13) & "Waiting 2 seconds" & Chr$(13)
   Label3.Caption = Tmp
   DoEvents
   n = cSleep(2000)
   If (cUnHideDebugForm() = True) Then
      Tmp = Tmp & "UnHideDebugForm SUCCESS"
   Else
      Tmp = Tmp & "UnHideDebugForm FAIL"
   End If
   Label3.Caption = Tmp
End Sub
Sub TestHMAL (Management As Integer)
   Dim Tmp        As String
   Dim ErrCode    As Integer
   Dim HMA        As tagHMA
   HMA.nType = DA_LONG
   HMA.nIsTyped = False
   HMA.nRows = 100
   HMA.nCols = 100
   HMA.nSheets = 2
   ErrCode = cHMACreate(HMA)
   Tmp = Tmp & "ErrCode = " & ErrCode & Chr$(13) & Chr$(13)
   If (ErrCode = True) Then
      
      Tmp = Tmp & "HMA.daSize       = " & HMA.daSize & Chr$(13)
      Tmp = Tmp & "HMA.nType        = " & HMA.nType & Chr$(13)
      Tmp = Tmp & "HMA.nIsTyped     = " & HMA.nIsTyped & Chr$(13)
      Tmp = Tmp & "HMA.nRows        = " & HMA.nRows & Chr$(13)
      Tmp = Tmp & "HMA.nCols        = " & HMA.nCols & Chr$(13)
      Tmp = Tmp & "HMA.nSheets      = " & HMA.nSheets & Chr$(13)
      Tmp = Tmp & "HMA.rHandle      = " & HMA.rHandle & Chr$(13)
      Tmp = Tmp & "HMA.rElementSize = " & HMA.rElementSize & Chr$(13)
      Tmp = Tmp & "HMA.rMemorySize  = " & HMA.rMemorySize & Chr$(13)
      Tmp = Tmp & "HMA.rParts       = " & HMA.rParts & Chr$(13)
      Tmp = Tmp & "HMA.rRemain      = " & HMA.rRemain & Chr$(13)
      Tmp = Tmp & "HMA.rSheetSize   = " & HMA.rSheetSize & Chr$(13) & Chr$(13)
      
      Call cHMAPut(HMA, 1, 1, 1, 12345)
      Call cHMAPut(HMA, HMA.nRows, HMA.nCols, 1, 98765)
      
      Call cHMAPut(HMA, 1, HMA.nCols, 2, 34567890)
      Call cHMAPut(HMA, HMA.nRows, 1, 2, 123456789)
      Tmp = Tmp & "R:1  , C:1  , D:1, Value : " & cHMAGet(HMA, 1, 1, 1) & Chr$(13)
      Tmp = Tmp & "R:" & HMA.nRows & ", C:" & HMA.nCols & ", D:1, Value : " & cHMAGet(HMA, HMA.nRows, HMA.nCols, 1) & Chr$(13)
      
      Tmp = Tmp & "R:1  , C:" & HMA.nCols & ", D:2, Value : " & cHMAGet(HMA, 1, HMA.nCols, 2) & Chr$(13)
      Tmp = Tmp & "R:" & HMA.nRows & ", C:1  , D:2, Value : " & cHMAGet(HMA, HMA.nRows, 1, 2) & Chr$(13) & Chr$(13)
      If (Management > 0) Then
	 Select Case Management
	    Case 1         'clear all
	       ErrCode = cHMAClear(HMA)
	    Case 2         'clear sheet 2
	       ErrCode = cHMAClearSheet(HMA, 2)
	    Case 3         'clear last row
	       ErrCode = cHMAClearRow(HMA, HMA.nRows, 1)
	    Case 4         'clear last col
	       ErrCode = cHMAClearCol(HMA, HMA.nCols, 1)
	    Case 5         'clear last row in all sheets
	       ErrCode = cHMAClearRow(HMA, HMA.nRows, -1)
	    Case 6         'clear last col in all sheets
	       ErrCode = cHMAClearCol(HMA, HMA.nCols, -1)
	 End Select
	 Tmp = Tmp & "R:1  , C:1  , D:1, Value : " & cHMAGet(HMA, 1, 1, 1) & Chr$(13)
	 Tmp = Tmp & "R:" & HMA.nRows & ", C:" & HMA.nCols & ", D:1, Value : " & cHMAGet(HMA, HMA.nRows, HMA.nCols, 1) & Chr$(13)
	 Tmp = Tmp & "R:1  , C:" & HMA.nCols & ", D:2, Value : " & cHMAGet(HMA, 1, HMA.nCols, 2) & Chr$(13)
	 Tmp = Tmp & "R:" & HMA.nRows & ", C:1  , D:2, Value : " & cHMAGet(HMA, HMA.nRows, 1, 2) & Chr$(13)
      End If
   End If
   ErrCode = cHMAFree(HMA)
   Label3.Caption = Tmp
End Sub
Sub TestHMAStr (Management As Integer)
   Dim Tmp        As String
   Dim ErrCode    As Integer
   Dim HMA        As tagHMA
   HMA.nType = 50
   HMA.nIsTyped = False
   HMA.nRows = 100
   HMA.nCols = 100
   HMA.nSheets = 2
   ErrCode = cHMACreate(HMA)
   Tmp = Tmp & "ErrCode = " & ErrCode & Chr$(13) & Chr$(13)
   If (ErrCode = True) Then
      
      Tmp = Tmp & "HMA.daSize       = " & HMA.daSize & Chr$(13)
      Tmp = Tmp & "HMA.nType        = " & HMA.nType & Chr$(13)
      Tmp = Tmp & "HMA.nIsTyped     = " & HMA.nIsTyped & Chr$(13)
      Tmp = Tmp & "HMA.nRows        = " & HMA.nRows & Chr$(13)
      Tmp = Tmp & "HMA.nCols        = " & HMA.nCols & Chr$(13)
      Tmp = Tmp & "HMA.nSheets      = " & HMA.nSheets & Chr$(13)
      Tmp = Tmp & "HMA.rHandle      = " & HMA.rHandle & Chr$(13)
      Tmp = Tmp & "HMA.rElementSize = " & HMA.rElementSize & Chr$(13)
      Tmp = Tmp & "HMA.rMemorySize  = " & HMA.rMemorySize & Chr$(13)
      Tmp = Tmp & "HMA.rParts       = " & HMA.rParts & Chr$(13)
      Tmp = Tmp & "HMA.rRemain      = " & HMA.rRemain & Chr$(13)
      Tmp = Tmp & "HMA.rSheetSize   = " & HMA.rSheetSize & Chr$(13) & Chr$(13)
      
      Call cHMAPut(HMA, 1, 1, 1, "D:1, ABCDEFGHIJ")
      Call cHMAPut(HMA, HMA.nRows, HMA.nCols, 1, "D:1, oprqstuvwxyz")
      
      Call cHMAPut(HMA, 1, HMA.nCols, 2, "D:2, 0987654321")
      Call cHMAPut(HMA, HMA.nRows, 1, 2, "D:2, 12345ABCDE")
      Tmp = Tmp & "R:1  , C:1  , D:1, Value : " & cHMAGet(HMA, 1, 1, 1) & Chr$(13)
      Tmp = Tmp & "R:" & HMA.nRows & ", C:" & HMA.nCols & ", D:1, Value : " & cHMAGet(HMA, HMA.nRows, HMA.nCols, 1) & Chr$(13)
      
      Tmp = Tmp & "R:1  , C:" & HMA.nCols & ", D:2, Value : " & cHMAGet(HMA, 1, HMA.nCols, 2) & Chr$(13)
      Tmp = Tmp & "R:" & HMA.nRows & ", C:1  , D:2, Value : " & cHMAGet(HMA, HMA.nRows, 1, 2) & Chr$(13) & Chr$(13)
      If (Management > 0) Then
	 Select Case Management
	    Case 1         'clear all
	       ErrCode = cHMAClear(HMA)
	    Case 2         'clear sheet 2
	       ErrCode = cHMAClearSheet(HMA, 2)
	    Case 3         'clear last row
	       ErrCode = cHMAClearRow(HMA, HMA.nRows, 1)
	    Case 4         'clear last col
	       ErrCode = cHMAClearCol(HMA, HMA.nCols, 1)
	    Case 5         'clear last row in all sheets
	       ErrCode = cHMAClearRow(HMA, HMA.nRows, -1)
	    Case 6         'clear last col in all sheets
	       ErrCode = cHMAClearCol(HMA, HMA.nCols, -1)
	 End Select
	 Tmp = Tmp & "R:1  , C:1  , D:1, Value : " & cHMAGet(HMA, 1, 1, 1) & Chr$(13)
	 Tmp = Tmp & "R:" & HMA.nRows & ", C:" & HMA.nCols & ", D:1, Value : " & cHMAGet(HMA, HMA.nRows, HMA.nCols, 1) & Chr$(13)
	 Tmp = Tmp & "R:1  , C:" & HMA.nCols & ", D:2, Value : " & cHMAGet(HMA, 1, HMA.nCols, 2) & Chr$(13)
	 Tmp = Tmp & "R:" & HMA.nRows & ", C:1  , D:2, Value : " & cHMAGet(HMA, HMA.nRows, 1, 2) & Chr$(13)
      End If
   End If
   ErrCode = cHMAFree(HMA)
   Label3.Caption = Tmp
End Sub
Sub TestHMAType (Management As Integer)
   Dim Tmp        As String
   Dim ErrCode    As Integer
   Dim HMA        As tagHMA
   Dim TE         As tagTASKENTRY
   HMA.nType = Len(TE)
   HMA.nIsTyped = True
   HMA.nRows = 100
   HMA.nCols = 100
   HMA.nSheets = 2
   ErrCode = cHMACreate(HMA)
   Tmp = Tmp & "ErrCode = " & ErrCode & Chr$(13) & Chr$(13)
   If (ErrCode = True) Then
      
      Tmp = Tmp & "HMA.daSize       = " & HMA.daSize & Chr$(13)
      Tmp = Tmp & "HMA.nType        = " & HMA.nType & Chr$(13)
      Tmp = Tmp & "HMA.nIsTyped     = " & HMA.nIsTyped & Chr$(13)
      Tmp = Tmp & "HMA.nRows        = " & HMA.nRows & Chr$(13)
      Tmp = Tmp & "HMA.nCols        = " & HMA.nCols & Chr$(13)
      Tmp = Tmp & "HMA.nSheets      = " & HMA.nSheets & Chr$(13)
      Tmp = Tmp & "HMA.rHandle      = " & HMA.rHandle & Chr$(13)
      Tmp = Tmp & "HMA.rElementSize = " & HMA.rElementSize & Chr$(13)
      Tmp = Tmp & "HMA.rMemorySize  = " & HMA.rMemorySize & Chr$(13)
      Tmp = Tmp & "HMA.rParts       = " & HMA.rParts & Chr$(13)
      Tmp = Tmp & "HMA.rRemain      = " & HMA.rRemain & Chr$(13)
      Tmp = Tmp & "HMA.rSheetSize   = " & HMA.rSheetSize & Chr$(13) & Chr$(13)
      ErrCode = cTasks(TE, True)
      Call cHMAPutType(HMA, 1, 1, 1, TE)
      ErrCode = cTasks(TE, False)
      Call cHMAPutType(HMA, HMA.nRows, HMA.nCols, 1, TE)
      
      ErrCode = cTasks(TE, False)
      Call cHMAPutType(HMA, 1, HMA.nCols, 2, TE)
      ErrCode = cTasks(TE, False)
      Call cHMAPutType(HMA, HMA.nRows, 1, 2, TE)
      
      Call cHMAGetType(HMA, 1, 1, 1, TE)
      Tmp = Tmp & "R:1  , C:1  , D:1, TE.szModule : " & cCompress(TE.szModule) & Chr$(13)
      Call cHMAGetType(HMA, HMA.nRows, HMA.nCols, 1, TE)
      Tmp = Tmp & "R:" & HMA.nRows & ", C:" & HMA.nCols & ", D:1, TE.szModule : " & cCompress(TE.szModule) & Chr$(13)
      
      Call cHMAGetType(HMA, 1, HMA.nCols, 2, TE)
      Tmp = Tmp & "R:1  , C:" & HMA.nCols & ", D:2, TE.szModule : " & cCompress(TE.szModule) & Chr$(13)
      Call cHMAGetType(HMA, HMA.nRows, 1, 2, TE)
      Tmp = Tmp & "R:" & HMA.nRows & ", C:1  , D:2, TE.szModule : " & cCompress(TE.szModule) & Chr$(13) & Chr$(13)
      If (Management > 0) Then
	 Select Case Management
	    Case 1         'clear all
	       ErrCode = cHMAClear(HMA)
	    Case 2         'clear sheet 2
	       ErrCode = cHMAClearSheet(HMA, 2)
	    Case 3         'clear last row
	       ErrCode = cHMAClearRow(HMA, HMA.nRows, 1)
	    Case 4         'clear last col
	       ErrCode = cHMAClearCol(HMA, HMA.nCols, 1)
	    Case 5         'clear last row in all sheets
	       ErrCode = cHMAClearRow(HMA, HMA.nRows, -1)
	    Case 6         'clear last col in all sheets
	       ErrCode = cHMAClearCol(HMA, HMA.nCols, -1)
	 End Select
	 Call cHMAGetType(HMA, 1, 1, 1, TE)
	 Tmp = Tmp & "R:1  , C:1  , D:1, TE.szModule : " & cCompress(TE.szModule) & Chr$(13)
	 Call cHMAGetType(HMA, HMA.nRows, HMA.nCols, 1, TE)
	 Tmp = Tmp & "R:" & HMA.nRows & ", C:" & HMA.nCols & ", D:1, TE.szModule : " & cCompress(TE.szModule) & Chr$(13)
      
	 Call cHMAGetType(HMA, 1, HMA.nCols, 2, TE)
	 Tmp = Tmp & "R:1  , C:" & HMA.nCols & ", D:2, TE.szModule : " & cCompress(TE.szModule) & Chr$(13)
	 Call cHMAGetType(HMA, HMA.nRows, 1, 2, TE)
	 Tmp = Tmp & "R:" & HMA.nRows & ", C:1  , D:2, TE.szModule : " & cCompress(TE.szModule) & Chr$(13)
      End If
   End If
   ErrCode = cHMAFree(HMA)
   Label3.Caption = Tmp
End Sub
Sub TestHourTo ()
   Dim title      As String
   Dim Tmp        As String
   Dim Tmp1       As String
   Dim Tmp2       As String
   Dim i          As Integer
   Dim j          As Integer
   Tmp1 = "The time 10:00 is " & cHourTo("10:00") & " minutes" & Chr$(13)
   Tmp1 = Tmp1 & "The time 23:58 is " & cHourTo("23:58") & " minutes" & Chr$(13)
   Tmp1 = Tmp1 & "The time 7:36 is " & cHourTo("7:36") & " minutes" & Chr$(13)
   Tmp1 = Tmp1 & "The time :24 is " & cHourTo(":24") & " minutes" & Chr$(13)
   Tmp1 = Tmp1 & "The time :4 is " & cHourTo(":4") & " minutes" & Chr$(13)
   Tmp1 = Tmp1 & "The time : is " & cHourTo(":") & " minutes" & Chr$(13) & Chr$(13)
   Tmp1 = Tmp1 & "The time -10:00 is " & cHourTo("-10:00") & " minutes" & Chr$(13)
   Tmp1 = Tmp1 & "The time -23:58 is " & cHourTo("-23:58") & " minutes" & Chr$(13)
   Tmp1 = Tmp1 & "The time -7:36 is " & cHourTo("-7:36") & " minutes" & Chr$(13)
   Tmp1 = Tmp1 & "The time -:24 is " & cHourTo("-:24") & " minutes" & Chr$(13)
   Tmp1 = Tmp1 & "The time -:4 is " & cHourTo("-:4") & " minutes" & Chr$(13)
   Tmp1 = Tmp1 & "The time -: is " & cHourTo("-:") & " minutes" & Chr$(13) & Chr$(13)
   cStartBasisTimer
   For i = 1 To Item
      j = cHourTo("23:59")
   Next i
   Tmp1 = Tmp1 & "speed for " & Item & " = " & cReadBasisTimer() & " ms"
   Label3.Caption = Tmp1
End Sub
Sub Testing ()
    Dim File1       As String
    Dim FVI         As tagFILEVERSIONINFO
    Dim Status      As Integer
    Dim i           As Integer
    Dim Tmp1         As String
    File1 = cFilesInDirectory("c:\windows\system\*.*", True)
    While File1 <> ""
	Status = cGetFileVersionInfo(File1, FVI)
	i = i + 1
      Tmp1 = ""
      Tmp1 = Tmp1 & "   VersionProduct = " & FVI.VersionProduct & Chr$(13)
      Tmp1 = Tmp1 & "   FileDescription = " & FVI.FileDescription & Chr$(13)
      Tmp1 = Tmp1 & "   FileVersion = " & FVI.FileVersion & Chr$(13)
      Tmp1 = Tmp1 & "   InternalName = " & FVI.InternalName & Chr$(13)
      Tmp1 = Tmp1 & "   LegalCopyright = " & FVI.LegalCopyright & Chr$(13)
      Tmp1 = Tmp1 & "   LegalTrademarks = " & FVI.LegalTrademarks & Chr$(13)
      Tmp1 = Tmp1 & "   Comments = " & FVI.Comments & Chr$(13)
      Tmp1 = Tmp1 & "   ProductName = " & FVI.ProductName & Chr$(13)
      Tmp1 = Tmp1 & "   ProductVersion = " & FVI.ProductVersion & Chr$(13) & Chr$(13)
      Label3.Caption = Tmp1
	Text1.Text = i & " " & File1 & " " & Status & " '" & FVI.FileDescription & "'"
      DoEvents
	File1 = cFilesInDirectory("c:\windows\system\*.*", False)
    Wend
End Sub
Sub TestInpBox ()
   Dim i       As Integer
   Dim n       As Integer
   Dim Tmp     As String
   Dim Tmp1    As String
   Tmp = "'TIME TO WIN'" & Chr$(13) & Chr$(13)
   Tmp = Tmp & " is a powerfull data link library for using with Visual Basic 3.0 for Windows." & Chr$(13)
   Tmp = Tmp & "It looks very better than the standard message box." & Chr$(13)
   Tmp = Tmp & "All push buttons are displayed in French." & Chr$(13)
   Tmp = Tmp & "The system menu is also in French."
   Tmp1 = cLngInpBox(LNG_FRENCH, Tmp, "Input Box in French", "" & Text1.Text)
   Tmp1 = InputBox$("This is a standard input box", "VB INPUT BOX", "" & Text1.Text)
End Sub
Sub TestInsertBlocks ()
   Dim title      As String
   Dim Tmp        As String
   Dim Tmp1       As String
   Dim Tmp2       As String
   Dim i          As Integer
   Dim j          As Integer
   Tmp = "A~BC~DEF~GHIJ~"
   title = "Insert 'a','bc','def','ghij' into [" & Tmp & "] is " & Chr$(13) & Chr$(13)
   Tmp1 = title & cInsertBlocks(Tmp, "a~bc~def~ghij") & Chr$(13) & Chr$(13)
   title = "Insert '' into [" & Tmp & "] is " & Chr$(13) & Chr$(13)
   Tmp1 = Tmp1 & title & cInsertBlocks(Tmp, "") & Chr$(13) & Chr$(13)
   cStartBasisTimer
   For i = 1 To Item
      Tmp2 = cInsertBlocks(Tmp, "a")
   Next i
   Tmp1 = Tmp1 & "speed for " & Item & " = " & cReadBasisTimer() & " ms"
   Label3.Caption = Tmp1
End Sub
Sub TestInsertBlocksBy ()
   Dim title      As String
   Dim Tmp        As String
   Dim Tmp1       As String
   Dim Tmp2       As String
   Dim i          As Integer
   Dim j          As Integer
   Tmp = Text1.Text
   title = "Insert 'a','bc','def','ghij' into [" & Tmp & "] is " & Chr$(13) & Chr$(13)
   Tmp1 = title & cInsertBlocksBy(Tmp, "a/bc/def/ghij", "/") & Chr$(13) & Chr$(13)
   title = "Insert '' into [" & Tmp & "] is " & Chr$(13) & Chr$(13)
   Tmp1 = Tmp1 & title & cInsertBlocksBy(Tmp, "", "/") & Chr$(13) & Chr$(13)
   cStartBasisTimer
   For i = 1 To Item
      Tmp2 = cInsertBlocksBy(Tmp, "a/bc/def/ghij", "/")
   Next i
   Tmp1 = Tmp1 & "speed for " & Item & " = " & cReadBasisTimer() & " ms"
   Label3.Caption = Tmp1
End Sub
Sub TestInsertChars ()
   Dim title      As String
   Dim Tmp        As String
   Dim Tmp1       As String
   Dim Tmp2       As String
   Dim i          As Integer
   Dim j          As Integer
   Tmp = Text1.Text
   title = "Insert 'a' from 7 char into [" & Tmp & "] is " & Chr$(13) & Chr$(13)
   Tmp1 = title & cInsertChars(Tmp, 7, "a") & Chr$(13) & Chr$(13)
   title = "Insert '10$' from 2 char into [" & Tmp & "] is " & Chr$(13) & Chr$(13)
   Tmp1 = Tmp1 & title & cInsertChars(Tmp, 2, "10$") & Chr$(13) & Chr$(13)
   title = "Insert '@' from 21 char into [" & Tmp & "] is " & Chr$(13) & Chr$(13)
   Tmp1 = Tmp1 & title & cInsertChars(Tmp, 21, "@") & Chr$(13) & Chr$(13)
   cStartBasisTimer
   For i = 1 To Item
      Tmp2 = cInsertChars(Tmp, 1, "a")
   Next i
   Tmp1 = Tmp1 & "speed for " & Item & " = " & cReadBasisTimer() & " ms"
   Label3.Caption = Tmp1
End Sub
Sub TestIntoBalance ()
   Dim title      As String
   Dim Tmp        As String
   Dim Tmp1       As String
   Dim Tmp2       As String
   Dim i          As Integer
   Dim j          As Integer
   j = 1234
   title = "Convert minutes into balance : " & Chr$(13) & Chr$(13)
   Tmp1 = title & Chr$(13)
   For i = 0 To 11
      Tmp1 = Tmp1 & (j + i) & " { " & cIntoBalanceFill(j + i) & " }" & Chr$(9) & Chr$(9)
      Tmp1 = Tmp1 & "{ " & cIntoBalance(j + i) & " }" & Chr$(13)
   Next i
   Tmp1 = Tmp1 & Chr$(13)
   cStartBasisTimer
   For i = 1 To Item
      Tmp2 = cIntoBalanceFill(i)
   Next i
   Tmp1 = Tmp1 & "speed for " & Item & " = " & cReadBasisTimer() & " ms"
   Label3.Caption = Tmp1
End Sub
Sub TestIntoFixHour ()
   Dim title      As String
   Dim Tmp        As String
   Dim Tmp1       As String
   Dim Tmp2       As String
   Dim i          As Integer
   Dim j          As Integer
   j = 12345
   title = "Convert " & j & " minutes into fixed hour : " & Chr$(13) & Chr$(13)
   Tmp1 = title & Chr$(13)
   For i = 0 To 11
      Tmp1 = Tmp1 & "{ " & cIntoFixHour(j, i, True, False) & " }" & Chr$(9) & Chr$(9)
      Tmp1 = Tmp1 & "{ " & cIntoFixHour(j, i, False, False) & " }" & Chr$(13)
   Next i
   Tmp1 = Tmp1 & Chr$(13)
   cStartBasisTimer
   For i = 1 To Item
      Tmp2 = cIntoFixHour(12345, 8, True, False)
   Next i
   Tmp1 = Tmp1 & "speed for " & Item & " = " & cReadBasisTimer() & " ms"
   Label3.Caption = Tmp1
End Sub
Sub TestIntoHour ()
   Dim title      As String
   Dim Tmp        As String
   Dim Tmp1       As String
   Dim Tmp2       As String
   Dim i          As Integer
   Dim j          As Integer
   j = 1234
   title = "Convert minutes into hour : " & Chr$(13) & Chr$(13)
   Tmp1 = title & Chr$(13)
   For i = 0 To 11
      Tmp1 = Tmp1 & (j + i) & " { " & cIntoHour(j + i) & " }" & Chr$(13)
   Next i
   Tmp1 = Tmp1 & Chr$(13)
   cStartBasisTimer
   For i = 1 To Item
      Tmp2 = cIntoHour(i)
   Next i
   Tmp1 = Tmp1 & "speed for " & Item & " = " & cReadBasisTimer() & " ms"
   Label3.Caption = Tmp1
End Sub
Sub TestIntoVarHour ()
   Dim title      As String
   Dim Tmp        As String
   Dim Tmp1       As String
   Dim Tmp2       As String
   Dim i          As Integer
   Dim j          As Integer
   Dim k          As Long
			    
   title = "Convert minutes into variable hour : " & Chr$(13) & Chr$(13)
   Tmp1 = title & Chr$(13)
   For i = 1 To 9
      Tmp2 = Tmp2 & (10 - i)
      Tmp1 = Tmp1 & Tmp2 & " { " & cIntoVarHour(Val(Tmp2)) & " }" & Chr$(13)
   Next i
   Tmp1 = Tmp1 & Chr$(13)
   cStartBasisTimer
   For i = 1 To Item
      Tmp2 = cIntoVarHour(123456789)
   Next i
   Tmp1 = Tmp1 & "speed for " & Item & " = " & cReadBasisTimer() & " ms"
   Label3.Caption = Tmp1
End Sub
Sub TestIsBitPalindrome ()
   Dim title      As String
   Dim Tmp        As String
   Dim Tmp1       As String
   Dim Tmp2       As String
   Dim i          As Integer
   Dim j          As Integer
   Tmp = Text1.Text
   title = "[" & Tmp & "] is "
   Tmp1 = title & IIf(cIsPalindrome(Tmp), "a Bit Palindrome", " not a Bit Palindrome") & Chr$(13) & Chr$(13)
   For i = 1 To 255
      If cIsBitPalindrome(Chr$(i)) Then Tmp2 = Tmp2 + Chr$(i) & "(" & i & ")" & Chr$(9)
   Next i
   title = "The followings chars are Bit Palindrome : " & Chr$(13) & Chr$(13)
   Tmp1 = Tmp1 & title & Tmp2 & Chr$(13) & Chr$(13)
   cStartBasisTimer
   For i = 1 To Item
      j = cIsPalindrome(Tmp)
   Next i
   Tmp1 = Tmp1 & "speed for " & Item & " = " & cReadBasisTimer() & " ms"
   Label3.Caption = Tmp1
End Sub
Sub TestIsFileX ()
   Dim title      As String
   Dim Tmp        As String
   Dim Tmp1       As String
   Dim Tmp2       As String
   Dim i          As Integer
   Dim j          As Integer
   Tmp = cFilesInDirectory("*.*", True)
   title = "[" & Tmp & "] is "
   Tmp1 = title & Chr$(13) & Chr$(13)
   Tmp1 = Tmp1 & IIf(cIsFilenameValid(Tmp), " a good filename", " is not a good filename") & Chr$(13)
   Tmp1 = Tmp1 & IIf(cIsFileArchive(Tmp), " archive", " not archive") & Chr$(13)
   Tmp1 = Tmp1 & IIf(cIsFileHidden(Tmp), " hidden", " not hidden") & Chr$(13)
   Tmp1 = Tmp1 & IIf(cIsFileNormal(Tmp), " normal", " not normal") & Chr$(13)
   Tmp1 = Tmp1 & IIf(cIsFileReadOnly(Tmp), " read-only", " not read-only") & Chr$(13)
   Tmp1 = Tmp1 & IIf(cIsFileSubDir(Tmp), " sub-directory", " not sub-directory") & Chr$(13)
   Tmp1 = Tmp1 & IIf(cIsFileSystem(Tmp), " system", " not system") & Chr$(13)
   Tmp1 = Tmp1 & IIf(cIsFileVolId(Tmp), " volume-id", " not volume-id") & Chr$(13) & Chr$(13)
   cStartBasisTimer
   For i = 1 To Item
      j = cIsFileArchive(Tmp)
   Next i
   Tmp1 = Tmp1 & "speed for " & Item & " = " & cReadBasisTimer() & " ms"
   Label3.Caption = Tmp1
End Sub
Sub TestIsPalindrome ()
   Dim title      As String
   Dim Tmp        As String
   Dim Tmp1       As String
   Dim Tmp2       As String
   Dim i          As Integer
   Dim j          As Integer
   Tmp = Text1.Text
   title = "[" & Tmp & "] is "
   Tmp1 = title & IIf(cIsPalindrome(Tmp), "a Palindrome", " not a Palindrome") & Chr$(13) & Chr$(13)
   cStartBasisTimer
   For i = 1 To Item
      j = cIsPalindrome(Tmp)
   Next i
   Tmp1 = Tmp1 & "speed for " & Item & " = " & cReadBasisTimer() & " ms"
   Label3.Caption = Tmp1
End Sub
Sub TestIsX ()
   Dim title      As String
   Dim Tmp        As String
   Dim Tmp1       As String
   Dim Tmp2       As String
   Dim i          As Integer
   Dim j          As Integer
   Tmp = Text1.Text
   Tmp1 = "[" & Tmp & "] is " & Chr$(13)
   Tmp1 = Tmp1 & IIf(cIsDigit(Tmp), "Digit", " not Digit") & Chr$(13)
   Tmp1 = Tmp1 & IIf(cIsXdigit(Tmp), "XDigit", " not XDigit") & Chr$(13)
   Tmp1 = Tmp1 & IIf(cIsAlpha(Tmp), "Alpha", " not Alpha") & Chr$(13)
   Tmp1 = Tmp1 & IIf(cIsLower(Tmp), "Lower", " not Lower") & Chr$(13)
   Tmp1 = Tmp1 & IIf(cIsUpper(Tmp), "Upper", " not Upper") & Chr$(13)
   Tmp1 = Tmp1 & IIf(cIsAlnum(Tmp), "Alnum", " not Alnum") & Chr$(13)
   Tmp1 = Tmp1 & IIf(cIsUpper(Tmp), "Upper", " not Upper") & Chr$(13)
   Tmp1 = Tmp1 & IIf(cIsSpace(Tmp), "Space", " not Space") & Chr$(13)
   Tmp1 = Tmp1 & IIf(cIsPunct(Tmp), "Punct", " not Punct") & Chr$(13)
   Tmp1 = Tmp1 & IIf(cIsAscii(Tmp), "Ascii", " not Ascii") & Chr$(13)
   Tmp1 = Tmp1 & IIf(cIsCsym(Tmp), "Csym", " not Csym") & Chr$(13)
   Tmp1 = Tmp1 & IIf(cIsCsymf(Tmp), "Csymf", " not Csymf") & Chr$(13)
   Tmp1 = Tmp1 & IIf(cIsISBN(Tmp), "ISBN", " not ISBN") & Chr$(13) & Chr$(13)
   cStartBasisTimer
   For i = 1 To Item
      j = cIsDigit(Tmp)
   Next i
   Tmp1 = Tmp1 & "speed for " & Item & " = " & cReadBasisTimer() & " ms"
   Label3.Caption = Tmp1
End Sub
Sub TestKillDir ()
   Dim title      As String
   Dim Tmp        As String
   Dim Tmp1       As String
   Dim Tmp2       As String
   Dim i          As Integer
   Dim j          As Integer
   j = cMakeDir("c:\testing")
   Tmp1 = "Directory 'TESTING' " & IIf(cKillDir("c:\testing") = True, "deleted", "not deleted") & Chr$(13) & Chr$(13)
   cStartBasisTimer
   For i = 1 To ItemFile
      j = cKillDir("c:\testing")
   Next i
   Tmp1 = Tmp1 & "speed for " & ItemFile & " = " & cReadBasisTimer() & " ms"
   Label3.Caption = Tmp1
End Sub
Sub TestKillDirs ()
   Dim title      As String
   Dim Tmp        As String
   Dim Tmp1       As String
   Dim Tmp2       As String
   Dim i          As Integer
   Dim j          As Integer
   Dim File       As String
   File = "c:\this1\this2\this3"
   j = cMakeMultipleDir(File)
   Tmp1 = "Create '" & File & "' " & IIf(j = True, "created", "not created") & Chr$(13)
   Tmp1 = Tmp1 & "Directory '" & File & "' " & IIf(cKillDirs(File, True) = True, "deleted", "not deleted") & Chr$(13) & Chr$(13)
   cStartBasisTimer
   For i = 1 To ItemFile
      j = cKillDirs(File, True)
   Next i
   Tmp1 = Tmp1 & "speed for " & ItemFile & " = " & cReadBasisTimer() & " ms"
   Label3.Caption = Tmp1
End Sub
Sub TestKillFile ()
   Dim title      As String
   Dim Tmp        As String
   Dim Tmp1       As String
   Dim Tmp2       As String
   Dim i          As Integer
   Dim j          As Integer
   Close #1
   Open "XY~YX~XY.~~~" For Output As #1
   Print #1, "this is a test";
   Close #1
   Tmp1 = "File XY~YX~XY.~~~ " & IIf(cKillFile("XY~YX~XY.~~~") = True, "destroyed", "not destroyed") & Chr$(13) & Chr$(13)
   cStartBasisTimer
   For i = 1 To Item
      j = cKillFile("XY~YX~XY.~~~")
   Next i
   Tmp1 = Tmp1 & "speed for " & Item & " = " & cReadBasisTimer() & " ms"
   Label3.Caption = Tmp1
End Sub
Sub TestKillFiles ()
   Dim title      As String
   Dim Tmp        As String
   Dim Tmp1       As String
   Dim Tmp2       As String
   Dim i          As Integer
   Dim j          As Integer
   For i = 1 To 34
      Close #1
      Open "C:\XY~YX~XY." & i For Output As #1
      Print #1, "this is a test";
      Close #1
   Next i
   Tmp1 = "Number of killed Files from 'C:XY~YX~XY.1' to 'C:XY~YX~XY.34' is " & cKillFiles("C:\XY~YX~XY.*") & Chr$(13) & Chr$(13)
   cStartBasisTimer
   For i = 1 To ItemFile
      j = cKillFiles("C:\XY~YX~XY.~~~")
   Next i
   Tmp1 = Tmp1 & "speed for " & ItemFile & " = " & cReadBasisTimer() & " ms"
   Label3.Caption = Tmp1
End Sub
Sub TestLanguage ()
   Dim title      As String
   Dim Tmp        As String
   Dim Tmp1       As String
   Dim Tmp2       As String
   Dim i          As Integer
   Dim j          As Integer
   Dim k          As Long
   Dim ErrCode    As Integer
   ReDim Lng(LNG_FRENCH To LNG_NORVEGIAN)
   k = Int(Now)
   Lng(LNG_FRENCH) = "LNG_FRENCH"
   Lng(LNG_DUTCH) = "LNG_DUTCH"
   Lng(LNG_GERMAN) = "LNG_GERMAN"
   Lng(LNG_ENGLISH) = "LNG_ENGLISH"
   Lng(LNG_ITALIAN) = "LNG_ITALIAN"
   Lng(LNG_SPANISH) = "LNG_SPANISH"
   Lng(LNG_CATALAN) = "LNG_CATALAN"
   Lng(LNG_POLISH) = "LNG_POLISH"
   Lng(LNG_NORVEGIAN) = "LNG_NORVEGIAN"
   Tmp1 = ""
   For i = LNG_FRENCH To LNG_NORVEGIAN
      Tmp1 = Tmp1 + Lng(i) + " : " + cGetLongDay(i, Weekday(k)) & " " & Day(k) & " " & cGetLongMonth(i, Month(k)) & " " & Year(k) & Chr$(13)
   Next i
   Tmp1 = Tmp1 + Chr$(13)
   For i = LNG_FRENCH To LNG_NORVEGIAN
      Tmp1 = Tmp1 + Lng(i) + " : " + cGetShortDay(i, Weekday(k)) & " " & Day(k) & " " & cGetShortMonth(i, Month(k)) & " " & Year(k) & Chr$(13)
   Next i
   Tmp1 = Tmp1 + Chr$(13)
   cStartBasisTimer
   For i = 1 To Item
      Tmp = cGetLongMonth(LNG_FRENCH, 12)
   Next i
   Tmp1 = Tmp1 & "speed for " & Item & " = " & cReadBasisTimer() & " ms"
   Label3.Caption = Tmp1
End Sub
Sub TestLrc ()
   Dim title      As String
   Dim Tmp        As String
   Dim Tmp1       As String
   Dim Tmp2       As String
   Dim i          As Integer
   Dim j          As Integer
   Tmp = Chr$(2) & "0a12721536"
   Tmp1 = "Lrc for [" & Tmp & "] is " & cLrc(Tmp) & Chr$(13) & Chr$(13)
   cStartBasisTimer
   For i = 1 To Item
      Tmp2 = cLrc(Tmp)
   Next i
   Tmp1 = Tmp1 & "speed for " & Item & " = " & cReadBasisTimer() & " ms"
   Label3.Caption = Tmp1
End Sub
Sub TestMakeDir ()
   Dim title      As String
   Dim Tmp        As String
   Dim Tmp1       As String
   Dim Tmp2       As String
   Dim i          As Integer
   Dim j          As Integer
   j = cKillDir("testing")
   Tmp1 = "Directory 'TESTING' " & IIf(cMakeDir("testing") = True, "created", "not created") & Chr$(13) & Chr$(13)
   cStartBasisTimer
   For i = 1 To ItemFile
      j = cMakeDir("testing")
   Next i
   Tmp1 = Tmp1 & "speed for " & ItemFile & " = " & cReadBasisTimer() & " ms"
   Label3.Caption = Tmp1
End Sub
Sub TestMakePath ()
   Dim title      As String
   Dim Tmp        As String
   Dim Tmp1       As String
   Dim Tmp2       As String
   Dim Tmp3       As String
   Dim i          As Integer
   Dim n          As Integer
   Dim j          As Long
   Dim SPLITPATH  As tagSPLITPATH
   Tmp1 = ""
   Tmp = cMakePath("c", "tmp", "test", "dat")
   Tmp1 = Tmp1 & "Make Path of (c,tmp,test,dat) is '" & Tmp & "'" & Chr$(13) & Chr$(13)
   Tmp1 = Tmp1 & "Split Path '" & Tmp & "' into four components is :" & Chr$(13) & Chr$(13)
   n = cSplitPath(Tmp, SPLITPATH)
   Tmp1 = Tmp1 & Space$(3) & SPLITPATH.nDrive & Chr$(13)
   Tmp1 = Tmp1 & Space$(3) & SPLITPATH.nDir & Chr$(13)
   Tmp1 = Tmp1 & Space$(3) & SPLITPATH.nName & Chr$(13)
   Tmp1 = Tmp1 & Space$(3) & SPLITPATH.nExt & Chr$(13) & Chr$(13)
   cStartBasisTimer
   For i = 1 To Item
      Tmp = cMakePath("c", "tmp", "test", "dat")
   Next i
   Tmp1 = Tmp1 & "speed for " & Item & " = " & cReadBasisTimer() & " ms" & Chr$(13) & Chr$(13)
   Label3.Caption = Tmp1
End Sub
Sub TestMatrixAdd ()
   Dim Tmp1       As String
   Dim TmpA       As String
   Dim TmpB       As String
   Dim TmpC       As String
   Dim i          As Integer
   Dim j          As Integer
   ReDim arrayA(1 To 3, 1 To 3) As Double
   ReDim arrayB(1 To 3, 1 To 3) As Double
   ReDim arrayC(1 To 3, 1 To 3) As Double
   Randomize Timer
   For i = 1 To 3
      For j = 1 To 3
	 arrayA(i, j) = Int(RandI * Rnd(1))
	 arrayB(i, j) = Int(RandI * Rnd(1))
	 arrayC(i, j) = 0
	 TmpA = TmpA + Format$(arrayA(i, j), "00000  ")
	 TmpB = TmpB + Format$(arrayB(i, j), "00000  ")
      Next j
      TmpA = TmpA + Chr$(13)
      TmpB = TmpB + Chr$(13)
   Next i
   Call cMatrixAdd(3, arrayA(), arrayB(), arrayC())
   For i = 1 To 3
      For j = 1 To 3
	 TmpC = TmpC + Format$(arrayC(i, j), "00000  ")
      Next j
      TmpC = TmpC + Chr$(13)
   Next i
   Tmp1 = Tmp1 & "First array (A) is " & Chr$(13) & Chr$(13) & TmpA & Chr$(13)
   Tmp1 = Tmp1 & "Second array (B) is " & Chr$(13) & Chr$(13) & TmpB & Chr$(13)
   Tmp1 = Tmp1 & "The sum (A) + (B) = (C) is " & Chr$(13) & Chr$(13) & TmpC & Chr$(13)
   cStartBasisTimer
   For i = 1 To ItemFile
      Call cMatrixAdd(3, arrayA(), arrayB(), arrayC())
   Next i
   Tmp1 = Tmp1 & "speed for " & ItemFile & " = " & cReadBasisTimer() & " ms"
   Label3.Caption = Tmp1
End Sub
Sub TestMatrixCompare ()
   Dim Tmp1       As String
   Dim TmpA       As String
   Dim TmpC       As String
   Dim i          As Integer
   Dim j          As Integer
   Dim Idem       As Integer
   ReDim arrayA(1 To 3, 1 To 3) As Double
   ReDim arrayC(1 To 3, 1 To 3) As Double
   Randomize Timer
   For i = 1 To 3
      For j = 1 To 3
	 arrayA(i, j) = Int(RandI * Rnd(1))
	 arrayC(i, j) = Int(RandI * Rnd(1))
	 TmpA = TmpA + Format$(arrayA(i, j), "00000  ")
	 TmpC = TmpC + Format$(arrayC(i, j), "00000  ")
      Next j
      TmpA = TmpA + Chr$(13)
      TmpC = TmpC + Chr$(13)
   Next i
   Idem = cMatrixCompare(3, arrayA(), arrayC())
   Tmp1 = Tmp1 & "First array (A) is " & Chr$(13) & Chr$(13) & TmpA & Chr$(13)
   Tmp1 = Tmp1 & "Second array (C) is " & Chr$(13) & Chr$(13) & TmpC & Chr$(13)
   Tmp1 = Tmp1 & "Compare of (A) = (C) is " & Idem & Chr$(13) & Chr$(13)
   TmpA = ""
   TmpC = ""
   For i = 1 To 3
      For j = 1 To 3
	 arrayA(i, j) = Int(RandI * Rnd(1))
	 arrayC(i, j) = arrayA(i, j)
	 TmpA = TmpA + Format$(arrayA(i, j), "00000  ")
	 TmpC = TmpC + Format$(arrayC(i, j), "00000  ")
      Next j
      TmpA = TmpA + Chr$(13)
      TmpC = TmpC + Chr$(13)
   Next i
   Idem = cMatrixCompare(3, arrayA(), arrayC())
   Tmp1 = Tmp1 & "First array (A) is " & Chr$(13) & Chr$(13) & TmpA & Chr$(13)
   Tmp1 = Tmp1 & "Second array (C) is " & Chr$(13) & Chr$(13) & TmpC & Chr$(13)
   Tmp1 = Tmp1 & "Compare of (A) = (C) is " & Idem & Chr$(13) & Chr$(13)
   cStartBasisTimer
   For i = 1 To ItemFile
      Idem = cMatrixCompare(3, arrayA(), arrayC())
   Next i
   Tmp1 = Tmp1 & "speed for " & ItemFile & " = " & cReadBasisTimer() & " ms"
   Label3.Caption = Tmp1
End Sub
Sub TestMatrixCopy ()
   Dim Tmp1       As String
   Dim TmpA       As String
   Dim TmpC       As String
   Dim i          As Integer
   Dim j          As Integer
   ReDim arrayA(1 To 3, 1 To 3) As Double
   ReDim arrayC(1 To 3, 1 To 3) As Double
   Randomize Timer
   For i = 1 To 3
      For j = 1 To 3
	 arrayA(i, j) = Int(RandI * Rnd(1))
	 arrayC(i, j) = 0
	 TmpA = TmpA + Format$(arrayA(i, j), "00000  ")
      Next j
      TmpA = TmpA + Chr$(13)
   Next i
   Call cMatrixCopy(3, arrayA(), arrayC())
   For i = 1 To 3
      For j = 1 To 3
	 TmpC = TmpC + Format$(arrayC(i, j), "00000  ")
      Next j
      TmpC = TmpC + Chr$(13)
   Next i
   Tmp1 = Tmp1 & "First array (A) is " & Chr$(13) & Chr$(13) & TmpA & Chr$(13)
   Tmp1 = Tmp1 & "Copy of (A) = (C) is " & Chr$(13) & Chr$(13) & TmpC & Chr$(13)
   cStartBasisTimer
   For i = 1 To ItemFile
      Call cMatrixCopy(3, arrayA(), arrayC())
   Next i
   Tmp1 = Tmp1 & "speed for " & ItemFile & " = " & cReadBasisTimer() & " ms"
   Label3.Caption = Tmp1
End Sub
Sub TestMatrixDet ()
   Dim Tmp1       As String
   Dim TmpA       As String
   Dim TmpC       As String
   Dim i          As Integer
   Dim j          As Integer
   Dim det        As Double
   Dim nSize      As Integer
   nSize = 3
   ReDim arrayA(1 To nSize, 1 To nSize) As Double
   Randomize Timer
   For i = 1 To nSize
      For j = 1 To nSize
	 arrayA(i, j) = Int(RandI * Rnd(1))
	 TmpA = TmpA + Format$(arrayA(i, j), "00000  ")
      Next j
      TmpA = TmpA + Chr$(13)
   Next i
   Tmp1 = Tmp1 & "First array (A) is " & Chr$(13) & Chr$(13) & TmpA & Chr$(13)
   Tmp1 = Tmp1 & "Det of (A) = " & cMatrixDet(nSize, arrayA()) & Chr$(13) & Chr$(13)
   cStartBasisTimer
   For i = 1 To ItemFile
      det = cMatrixDet(nSize, arrayA())
      DoEvents
   Next i
   Tmp1 = Tmp1 & "speed for " & ItemFile & " = " & cReadBasisTimer() & " ms"
   Label3.Caption = Tmp1
End Sub
Sub TestMatrixInv ()
   Dim Tmp1       As String
   Dim TmpA       As String
   Dim TmpC       As String
   Dim i          As Integer
   Dim j          As Integer
   Dim result     As Integer
   ReDim arrayA(1 To 3, 1 To 3) As Double
   ReDim arrayC(1 To 3, 1 To 3) As Double
   Randomize Timer
   result = cMatrixFill(3, arrayA(), MATRIX_ZERO)
   result = cMatrixFill(3, arrayC(), MATRIX_UNIT)
   For i = 1 To 3
      For j = 1 To 3
	 arrayA(i, j) = Int(RandI * Rnd(1))
	 TmpA = TmpA + Format$(arrayA(i, j), "00000  ")
      Next j
      TmpA = TmpA + Chr$(13)
   Next i
   result = cMatrixInv(3, arrayA(), arrayC())
   If (result = True) Then
      For i = 1 To 3
	 For j = 1 To 3
	    TmpC = TmpC + Format$(arrayC(i, j), "0.0000000  ")
	 Next j
	 TmpC = TmpC + Chr$(13)
      Next i
   Else
      TmpC = " 'can be inverted'"
   End If
   Tmp1 = Tmp1 & "First array (A) is " & Chr$(13) & TmpA & Chr$(13)
   Tmp1 = Tmp1 & "Inv of (A) = (C) is " & Chr$(13) & TmpC & Chr$(13)
   TmpA = ""
   TmpC = ""
   result = cMatrixFill(3, arrayA(), MATRIX_ZERO)
   result = cMatrixFill(3, arrayC(), MATRIX_ZERO)
   For i = 1 To 3
      For j = 1 To 3
	 TmpA = TmpA + Format$(arrayA(i, j), "00000  ")
      Next j
      TmpA = TmpA + Chr$(13)
   Next i
   result = cMatrixInv(3, arrayA(), arrayC())
   If (result = True) Then
      For i = 1 To 3
	 For j = 1 To 3
	    TmpC = TmpC + Format$(arrayC(i, j), "0.0000000  ")
	 Next j
	 TmpC = TmpC + Chr$(13)
      Next i
   Else
      TmpC = " 'can be inverted'"
   End If
   Tmp1 = Tmp1 & "First array (A) is " & Chr$(13) & TmpA & Chr$(13)
   Tmp1 = Tmp1 & "Inv of (A) = (C) is " & Chr$(13) & TmpC & Chr$(13) & Chr$(13)
   For i = 1 To 3
      For j = 1 To 3
	 arrayA(i, j) = Int(RandI * Rnd(1))
      Next j
   Next i
   cStartBasisTimer
   For i = 1 To ItemFile
      result = cMatrixInv(3, arrayA(), arrayC())
   Next i
   Tmp1 = Tmp1 & "speed for " & ItemFile & " = " & cReadBasisTimer() & " ms"
   Label3.Caption = Tmp1
End Sub
Sub TestMatrixMinCo ()
   Dim Tmp1       As String
   Dim TmpA       As String
   Dim TmpC       As String
   Dim i          As Integer
   Dim j          As Integer
   Dim cofact     As Double
   Dim nSize      As Integer
   nSize = 3
   ReDim arrayA(1 To nSize, 1 To nSize) As Double
   Randomize Timer
   For i = 1 To nSize
      For j = 1 To nSize
	 arrayA(i, j) = Int(RandI * Rnd(1))
	 TmpA = TmpA + Format$(arrayA(i, j), "00000  ")
      Next j
      TmpA = TmpA + Chr$(13)
   Next i
   Tmp1 = Tmp1 & "First array (A) is " & Chr$(13) & Chr$(13) & TmpA & Chr$(13) & Chr$(13)
   Tmp1 = Tmp1 & "CoFactor of A(1,1) = " & cMatrixCoFactor(nSize, arrayA(), 1, 1) & Chr$(13)
   Tmp1 = Tmp1 & "CoFactor of A(2,2) = " & cMatrixCoFactor(nSize, arrayA(), 2, 2) & Chr$(13)
   Tmp1 = Tmp1 & "CoFactor of A(3,3) = " & cMatrixCoFactor(nSize, arrayA(), 3, 3) & Chr$(13) & Chr$(13)
   Tmp1 = Tmp1 & "Minor of A(1,1) = " & cMatrixMinor(nSize, arrayA(), 1, 1) & Chr$(13)
   Tmp1 = Tmp1 & "Minor of A(2,2) = " & cMatrixMinor(nSize, arrayA(), 2, 2) & Chr$(13)
   Tmp1 = Tmp1 & "Minor of A(3,3) = " & cMatrixMinor(nSize, arrayA(), 3, 3) & Chr$(13) & Chr$(13)
   cStartBasisTimer
   For i = 1 To ItemFile
      cofact = cMatrixCoFactor(nSize, arrayA(), 1, 1)
   Next i
   Tmp1 = Tmp1 & "speed for " & ItemFile & " = " & cReadBasisTimer() & " ms"
   Label3.Caption = Tmp1
End Sub
Sub TestMatrixMul ()
   Dim Tmp1       As String
   Dim TmpA       As String
   Dim TmpB       As String
   Dim TmpC       As String
   Dim i          As Integer
   Dim j          As Integer
   ReDim arrayA(1 To 3, 1 To 3) As Double
   ReDim arrayB(1 To 3, 1 To 3) As Double
   ReDim arrayC(1 To 3, 1 To 3) As Double
   Randomize Timer
   For i = 1 To 3
      For j = 1 To 3
	 arrayA(i, j) = Int(RandI * Rnd(1))
	 arrayB(i, j) = Int(RandI * Rnd(1))
	 arrayC(i, j) = 0
	 TmpA = TmpA + Format$(arrayA(i, j), "00000  ")
	 TmpB = TmpB + Format$(arrayB(i, j), "00000  ")
      Next j
      TmpA = TmpA + Chr$(13)
      TmpB = TmpB + Chr$(13)
   Next i
   Call cMatrixMul(3, arrayA(), arrayB(), arrayC())
   For i = 1 To 3
      For j = 1 To 3
	 TmpC = TmpC + Format$(arrayC(i, j), "000000000000  ")
      Next j
      TmpC = TmpC + Chr$(13)
   Next i
   Tmp1 = Tmp1 & "First array (A) is " & Chr$(13) & Chr$(13) & TmpA & Chr$(13)
   Tmp1 = Tmp1 & "Second array (B) is " & Chr$(13) & Chr$(13) & TmpB & Chr$(13)
   Tmp1 = Tmp1 & "The multiply (A) . (B) = (C) is " & Chr$(13) & Chr$(13) & TmpC & Chr$(13)
   cStartBasisTimer
   For i = 1 To ItemFile
      Call cMatrixMul(3, arrayA(), arrayB(), arrayC())
   Next i
   Tmp1 = Tmp1 & "speed for " & ItemFile & " = " & cReadBasisTimer() & " ms"
   Label3.Caption = Tmp1
End Sub
Sub TestMatrixSub ()
   Dim Tmp1       As String
   Dim TmpA       As String
   Dim TmpB       As String
   Dim TmpC       As String
   Dim i          As Integer
   Dim j          As Integer
   ReDim arrayA(1 To 3, 1 To 3) As Double
   ReDim arrayB(1 To 3, 1 To 3) As Double
   ReDim arrayC(1 To 3, 1 To 3) As Double
   Randomize Timer
   For i = 1 To 3
      For j = 1 To 3
	 arrayA(i, j) = Int(RandI * Rnd(1))
	 arrayB(i, j) = Int(RandI * Rnd(1))
	 arrayC(i, j) = 0
	 TmpA = TmpA + Format$(arrayA(i, j), "00000  ")
	 TmpB = TmpB + Format$(arrayB(i, j), "00000  ")
      Next j
      TmpA = TmpA + Chr$(13)
      TmpB = TmpB + Chr$(13)
   Next i
   Call cMatrixSub(3, arrayA(), arrayB(), arrayC())
   For i = 1 To 3
      For j = 1 To 3
	 TmpC = TmpC + Format$(arrayC(i, j), "00000  ")
      Next j
      TmpC = TmpC + Chr$(13)
   Next i
   Tmp1 = Tmp1 & "First array (A) is " & Chr$(13) & Chr$(13) & TmpA & Chr$(13)
   Tmp1 = Tmp1 & "Second array (B) is " & Chr$(13) & Chr$(13) & TmpB & Chr$(13)
   Tmp1 = Tmp1 & "The substract (A) - (B) = (C) is " & Chr$(13) & Chr$(13) & TmpC & Chr$(13)
   cStartBasisTimer
   For i = 1 To ItemFile
      Call cMatrixSub(3, arrayA(), arrayB(), arrayC())
   Next i
   Tmp1 = Tmp1 & "speed for " & ItemFile & " = " & cReadBasisTimer() & " ms"
   Label3.Caption = Tmp1
End Sub
Sub TestMatrixSymToeplitz ()
   Dim Tmp1       As String
   Dim TmpA       As String
   Dim TmpC       As String
   Dim i          As Integer
   Dim j          As Integer
   Dim result     As Integer
   ReDim arrayA(1 To 3, 1 To 3) As Double
   ReDim arrayC(1 To 3, 1 To 3) As Double
   Randomize Timer
   For i = 1 To 1
      For j = 1 To 3
	 arrayA(i, j) = Int(RandI * Rnd(1))
	 TmpA = TmpA + Format$(arrayA(i, j), "00000  ")
      Next j
      TmpA = TmpA + Chr$(13)
   Next i
   result = cMatrixSymToeplitz(3, arrayA(), arrayC())
   For i = 1 To 3
      For j = 1 To 3
	 TmpC = TmpC + Format$(arrayC(i, j), "00000  ")
      Next j
      TmpC = TmpC + Chr$(13)
   Next i
   Tmp1 = Tmp1 & "First array (A) is " & Chr$(13) & Chr$(13) & TmpA & Chr$(13)
   Tmp1 = Tmp1 & "Symmetrical Toeplitz of (A) = (C) is " & Chr$(13) & Chr$(13) & TmpC & Chr$(13)
   cStartBasisTimer
   For i = 1 To ItemFile
      result = cMatrixSymToeplitz(3, arrayA(), arrayC())
   Next i
   Tmp1 = Tmp1 & "speed for " & ItemFile & " = " & cReadBasisTimer() & " ms"
   Label3.Caption = Tmp1
End Sub
Sub TestMatrixTranspose ()
   Dim Tmp1       As String
   Dim TmpA       As String
   Dim TmpC       As String
   Dim i          As Integer
   Dim j          As Integer
   ReDim arrayA(1 To 3, 1 To 3) As Double
   ReDim arrayC(1 To 3, 1 To 3) As Double
   Randomize Timer
   For i = 1 To 3
      For j = 1 To 3
	 arrayA(i, j) = Int(RandI * Rnd(1))
	 arrayC(i, j) = 0
	 TmpA = TmpA + Format$(arrayA(i, j), "00000  ")
      Next j
      TmpA = TmpA + Chr$(13)
   Next i
   Call cMatrixTranspose(3, arrayA(), arrayC())
   For i = 1 To 3
      For j = 1 To 3
	 TmpC = TmpC + Format$(arrayC(i, j), "00000  ")
      Next j
      TmpC = TmpC + Chr$(13)
   Next i
   Tmp1 = Tmp1 & "First array (A) is " & Chr$(13) & Chr$(13) & TmpA & Chr$(13)
   Tmp1 = Tmp1 & "Transpose of (A) = (C) is " & Chr$(13) & Chr$(13) & TmpC & Chr$(13)
   cStartBasisTimer
   For i = 1 To ItemFile
      Call cMatrixTranspose(3, arrayA(), arrayC())
   Next i
   Tmp1 = Tmp1 & "speed for " & ItemFile & " = " & cReadBasisTimer() & " ms"
   Label3.Caption = Tmp1
End Sub
Sub TestMaxI ()
   Dim title      As String
   Dim Tmp        As String
   Dim Tmp1       As String
   Dim Tmp2       As String
   Dim i          As Integer
   Dim j          As Integer
   Dim m          As Double
   ReDim array(ItemMean) As Integer
   Randomize Timer
   For i = LBound(array) To UBound(array)
      array(i) = RandI * Rnd(1)
      List1.AddItem "" & array(i)
   Next i
   j = cSortI(array())
   For i = LBound(array) To UBound(array)
      List2.AddItem "" & array(i)
   Next i
   List2.ListIndex = List2.ListCount - 1
   Tmp1 = "The MAX of a integer array of " & (ItemMean + 1) & " elements is " & Chr$(13) & Chr$(13) & cMaxI(array()) & Chr$(13) & Chr$(13)
   cStartBasisTimer
   For i = 1 To ItemFile
      m = cMaxI(array())
   Next i
   Tmp1 = Tmp1 & "speed for " & ItemFile & " = " & cReadBasisTimer() & " ms"
   Label3.Caption = Tmp1
End Sub
Sub TestMD5 ()
   Dim title      As String
   Dim Tmp        As String
   Dim Tmp1       As String
   Dim Tmp2       As String
   Dim Tmp3       As String
   Dim i          As Integer
   Dim j          As Long
   Tmp2 = "TIME TO WIN"
   Tmp = Text1.Text
   Tmp1 = "HashMD5 for '" & Tmp2 & "' is " & cHashMD5(Tmp2) & Chr$(13) & Chr$(13)
   Tmp1 = Tmp1 & "HashMD5 for '" & Tmp & "' is " & cHashMD5(Tmp) & Chr$(13) & Chr$(13)
   Tmp1 = Tmp1 & "HashMD5 for '" & LCase$(Tmp2) & "' is " & cHashMD5(LCase$(Tmp2)) & Chr$(13) & Chr$(13)
   Tmp1 = Tmp1 & "HashMD5 for '" & LCase$(Tmp) & "' is " & cHashMD5(LCase$(Tmp)) & Chr$(13) & Chr$(13)
   Tmp1 = Tmp1 & "HashMD5 for '" & Left$(Tmp2, 3) & "' is " & cHashMD5(Left$(Tmp2, 3)) & Chr$(13) & Chr$(13)
   cStartBasisTimer
   For i = 1 To Item
      Tmp3 = cHashMD5(Tmp2)
   Next i
   Tmp1 = Tmp1 & "speed for " & Item & " = " & cReadBasisTimer() & " ms"
   Label3.Caption = Tmp1
End Sub
Sub TestMDA (Management As Integer)
   Dim Tmp        As String
   Dim ErrCode    As Integer
   Dim MDA        As tagMULTIPLEDISKARRAY
   Dim TE         As tagTASKENTRY
   ErrCode = cMakeDir("c:\t2w_tmp")
   MDA.nFilename = "c:\t2w_tmp\mda.tmp"
   MDA.nType(1) = DA_LONG     'long
   MDA.nIsTyped(1) = False
   MDA.nRows(1) = 20
   MDA.nCols(1) = 20
   MDA.nSheets(1) = 2
   MDA.nType(2) = 10          'string
   MDA.nIsTyped(2) = False
   MDA.nRows(2) = 20
   MDA.nCols(2) = 20
   MDA.nSheets(2) = 2
   MDA.nType(9) = Len(TE)     'type'd
   MDA.nIsTyped(9) = True
   MDA.nRows(9) = 20
   MDA.nCols(9) = 20
   MDA.nSheets(9) = 2
   Select Case Management
      Case True      'create
	 ErrCode = cMDACreate(MDA, True)
      Case False     'use
	 ErrCode = cMDACreate(MDA, False)
      Case 1         'clear all
	 ErrCode = cMDACreate(MDA, False)
	 If (ErrCode = -1) Then ErrCode = cMDAClear(1, MDA)
	 If (ErrCode = -1) Then ErrCode = cMDAClear(2, MDA)
	 If (ErrCode = -1) Then ErrCode = cMDAClear(9, MDA)
      Case 2         'clear sheet 2
	 ErrCode = cMDACreate(MDA, False)
	 If (ErrCode = -1) Then ErrCode = cMDAClearSheet(1, MDA, 2)
	 If (ErrCode = -1) Then ErrCode = cMDAClearSheet(2, MDA, 2)
	 If (ErrCode = -1) Then ErrCode = cMDAClearSheet(9, MDA, 2)
      Case 3         'clear last row
	 ErrCode = cMDACreate(MDA, False)
	 If (ErrCode = -1) Then ErrCode = cMDAClearRow(1, MDA, MDA.nRows(1), 1)
	 If (ErrCode = -1) Then ErrCode = cMDAClearRow(2, MDA, MDA.nRows(2), 1)
	 If (ErrCode = -1) Then ErrCode = cMDAClearRow(9, MDA, MDA.nRows(9), 1)
      Case 4         'clear last col
	 ErrCode = cMDACreate(MDA, False)
	 If (ErrCode = -1) Then ErrCode = cMDAClearCol(1, MDA, MDA.nCols(1), 1)
	 If (ErrCode = -1) Then ErrCode = cMDAClearCol(2, MDA, MDA.nCols(2), 1)
	 If (ErrCode = -1) Then ErrCode = cMDAClearCol(9, MDA, MDA.nCols(9), 1)
      Case 5         'clear last row in all sheets
	 ErrCode = cMDACreate(MDA, False)
	 If (ErrCode = -1) Then ErrCode = cMDAClearRow(1, MDA, MDA.nRows(1), -1)
	 If (ErrCode = -1) Then ErrCode = cMDAClearRow(2, MDA, MDA.nRows(2), -1)
	 If (ErrCode = -1) Then ErrCode = cMDAClearRow(9, MDA, MDA.nRows(9), -1)
      Case 6         'clear last col in all sheets
	 ErrCode = cMDACreate(MDA, False)
	 If (ErrCode = -1) Then ErrCode = cMDAClearCol(1, MDA, MDA.nCols(1), -1)
	 If (ErrCode = -1) Then ErrCode = cMDAClearCol(2, MDA, MDA.nCols(2), -1)
	 If (ErrCode = -1) Then ErrCode = cMDAClearCol(9, MDA, MDA.nCols(9), -1)
   End Select
   Tmp = Tmp & "ErrCode = " & ErrCode & Chr$(13) & Chr$(13)
   If (ErrCode = True) Then
      
      Tmp = Tmp & "MDA.daSize          = " & MDA.daSize & Chr$(13)
      Tmp = Tmp & "MDA.Signature       = " & MDA.Signature & Chr$(13)
      Tmp = Tmp & "MDA.nFilename       = " & Trim$(MDA.nFilename) & Chr$(13)
      Tmp = Tmp & "MDA.rHandle         = " & MDA.rHandle & Chr$(13)
      Tmp = Tmp & "MDA.rFileSize       = " & MDA.rFileSize & Chr$(13) & Chr$(13)
      Tmp = Tmp & "MDA.nType(1)(2)(9)        = (" & MDA.nType(1) & ") (" & MDA.nType(2) & ") (" & MDA.nType(9) & ")" & Chr$(13)
      Tmp = Tmp & "MDA.nIsTyped(1)(2)(9)     = (" & MDA.nIsTyped(1) & ") (" & MDA.nIsTyped(2) & ") (" & MDA.nIsTyped(9) & ")" & Chr$(13)
      Tmp = Tmp & "MDA.nRows(1)(2)(9)        = (" & MDA.nRows(1) & ") (" & MDA.nRows(2) & ") (" & MDA.nRows(9) & ")" & Chr$(13)
      Tmp = Tmp & "MDA.nCols(1)(2)(9)        = (" & MDA.nCols(1) & ") (" & MDA.nCols(2) & ") (" & MDA.nCols(9) & ")" & Chr$(13)
      Tmp = Tmp & "MDA.nSheets(1)(2)(9)      = (" & MDA.nSheets(1) & ") (" & MDA.nSheets(2) & ") (" & MDA.nSheets(9) & ")" & Chr$(13)
      Tmp = Tmp & "MDA.rElementSz(1)(2)(9)   = (" & MDA.rElementSz(1) & ") (" & MDA.rElementSz(2) & ") (" & MDA.rElementSz(9) & ")" & Chr$(13)
      Tmp = Tmp & "MDA.rSheetSz(1)(2)(9)     = (" & MDA.rSheetSz(1) & ") (" & MDA.rSheetSz(2) & ") (" & MDA.rSheetSz(9) & ")" & Chr$(13)
      Tmp = Tmp & "MDA.rOffsetPos(1)(2)(9)   = (" & MDA.rOffsetPos(1) & ") (" & MDA.rOffsetPos(2) & ") (" & MDA.rOffsetPos(9) & ")" & Chr$(13) & Chr$(13)
      If (Management = True) Then
	 Call cMDAPut(1, MDA, 1, 1, 1, 123456789)
	 Call cMDAPut(1, MDA, MDA.nRows(1), MDA.nCols(1), MDA.nSheets(1), 987654321)
      
	 Call cMDAPut(2, MDA, 1, 1, 1, "S:1, ABCDEFGHIJ")
	 Call cMDAPut(2, MDA, MDA.nRows(2), MDA.nCols(2), MDA.nSheets(2), "S:" & MDA.nSheets(2) & ", oprqstuvwxyz")
      
	 ErrCode = cTasks(TE, True)
	 Call cMDAPutType(9, MDA, 1, 1, 1, TE)
	 ErrCode = cTasks(TE, False)
	 Call cMDAPutType(9, MDA, MDA.nRows(9), MDA.nCols(9), MDA.nSheets(9), TE)
      
      End If
      Tmp = Tmp & "A:1  , R:1  , C:1  , S:1, Value : " & Trim$(cMDAGet(1, MDA, 1, 1, 1)) & "   , time : " & MDA.rTime & Chr$(13)
      Tmp = Tmp & "A:1  , R:" & MDA.nRows(1) & ", C:" & MDA.nCols(1) & ", S:" & MDA.nSheets(1) & ", Value : " & Trim$(cMDAGet(1, MDA, MDA.nRows(1), MDA.nCols(1), MDA.nSheets(1))) & "   , time : " & MDA.rTime & Chr$(13)
      Tmp = Tmp & "A:2  , R:1  , C:1  , S:1, Value : " & Trim$(cMDAGet(2, MDA, 1, 1, 1)) & "   , time : " & MDA.rTime & Chr$(13)
      Tmp = Tmp & "A:2  , R:" & MDA.nRows(2) & ", C:" & MDA.nCols(2) & ", S:" & MDA.nSheets(2) & ", Value : " & Trim$(cMDAGet(2, MDA, MDA.nRows(2), MDA.nCols(2), MDA.nSheets(2))) & "   , time : " & MDA.rTime & Chr$(13)
      Call cMDAGetType(9, MDA, 1, 1, 1, TE)
      Tmp = Tmp & "A:9  , R:1  , C:1  , S:1, TE.szModule : " & cCompress(TE.szModule) & "   , time : " & MDA.rTime & Chr$(13)
      Call cMDAGetType(9, MDA, MDA.nRows(9), MDA.nCols(9), MDA.nSheets(9), TE)
      Tmp = Tmp & "A:9  , R:" & MDA.nRows(9) & ", C:" & MDA.nCols(9) & ", S:" & MDA.nSheets(9) & ", TE.szModule : " & cCompress(TE.szModule) & "   , time : " & MDA.rTime & Chr$(13)
   End If
   Call cMDAClose(MDA, False)
   Label3.Caption = Tmp
End Sub
Sub TestMeanI ()
   Dim title      As String
   Dim Tmp        As String
   Dim Tmp1       As String
   Dim Tmp2       As String
   Dim i          As Integer
   Dim j          As Integer
   Dim m          As Double
   ReDim array(ItemMean) As Integer
   Randomize Timer
   m = 0
   For i = LBound(array) To UBound(array)
      array(i) = Int(RandI * Rnd(1))
      m = m + array(i)
      List1.AddItem "" & array(i)
   Next i
   Tmp1 = "The Mean of a integer array of " & (ItemMean + 1) & " elements is " & Chr$(13) & Chr$(13) & cMeanI(array()) & " (" & (m / (UBound(array) - LBound(array) + 1)) & ")" & Chr$(13) & Chr$(13)
   cStartBasisTimer
   For i = 1 To ItemFile
      m = cMeanI(array())
   Next i
   Tmp1 = Tmp1 & "speed for " & ItemFile & " = " & cReadBasisTimer() & " ms"
   Label3.Caption = Tmp1
End Sub
Sub TestMenuChange ()
   Call cSysMenuChange(Me.hWnd, 0, "&Restaurer")
   Call cSysMenuChange(Me.hWnd, 1, "&Positionner")
   Call cSysMenuChange(Me.hWnd, 2, "&Taille")
   Call cSysMenuChange(Me.hWnd, 3, "&Ic
   Call cSysMenuChange(Me.hWnd, 4, "&Plein 
cran")
   Call cSysMenuChange(Me.hWnd, 6, "&Fermer" + Chr$(9) + "Alt+F4")
   Call cSysMenuChange(Me.hWnd, 8, "&T
che" + Chr$(9) + "Ctrl+Esc")
End Sub
Sub TestMin ()
   Dim title      As String
   Dim Tmp        As String
   Dim Tmp1       As String
   Dim Tmp2       As String
   Dim i          As Integer
   Dim j          As Long
   Tmp1 = "Min of [32760,1234567] is " & cMin(32760, 1234567) & Chr$(13)
   Tmp1 = Tmp1 + "Max of [32760,1234567] is " & cMax(32760, 1234567) & Chr$(13)
   cStartBasisTimer
   For i = 1 To Item
      j = cMin(32760, 1234567)
   Next i
   Tmp1 = Tmp1 & "speed for " & Item & " = " & cReadBasisTimer() & " ms"
   Label3.Caption = Tmp1
End Sub
Sub TestMinI ()
   Dim title      As String
   Dim Tmp        As String
   Dim Tmp1       As String
   Dim Tmp2       As String
   Dim i          As Integer
   Dim j          As Integer
   Dim m          As Double
   ReDim array(ItemMean) As Integer
   Randomize Timer
   For i = LBound(array) To UBound(array)
      array(i) = RandI * Rnd(1)
      List1.AddItem "" & array(i)
   Next i
   j = cSortI(array())
   For i = LBound(array) To UBound(array)
      List2.AddItem "" & array(i)
   Next i
   List2.ListIndex = 0
   Tmp1 = "The MIN of a integer array of " & (ItemMean + 1) & " elements is " & Chr$(13) & Chr$(13) & cMinI(array()) & Chr$(13) & Chr$(13)
   cStartBasisTimer
   For i = 1 To ItemFile
      m = cMinI(array())
   Next i
   Tmp1 = Tmp1 & "speed for " & ItemFile & " = " & cReadBasisTimer() & " ms"
   Label3.Caption = Tmp1
End Sub
Sub TestMixChars ()
   Dim title      As String
   Dim Tmp        As String
   Dim Tmp1       As String
   Dim Tmp2       As String
   Dim i          As Integer
   Dim j          As Integer
   Tmp = Text1.Text
   Tmp1 = Tmp1 + "MixChars of [" & Tmp & "] is " & cMixChars(Tmp) & Chr$(13) & Chr$(13)
   Tmp = "TIME TO WIN"
   Tmp1 = Tmp1 + "MixChars of [" & Tmp & "] is " & cMixChars(Tmp) & Chr$(13) & Chr$(13)
   Tmp = "Nothing can beat the fox"
   Tmp1 = Tmp1 + "MixChars of [" & Tmp & "] is " & cMixChars(Tmp) & Chr$(13) & Chr$(13)
   Tmp = Text1.Text
   Tmp1 = Tmp1 + "MixChars of [" & Tmp & "] is " & cMixChars(Tmp) & Chr$(13) & Chr$(13)
   cStartBasisTimer
   For i = 1 To Item
      Tmp2 = cMixChars(Tmp)
   Next i
   Tmp1 = Tmp1 & "speed for " & Item & " = " & cReadBasisTimer() & " ms"
   Label3.Caption = Tmp1
End Sub
Sub TestMnuLanguage ()
   Load frmLng
   Call cShowWindow(frmLng.hWnd, 1, 340)
   frmLng.Show
End Sub
Sub TestMorse ()
   Dim title      As String
   Dim Tmp        As String
   Dim Tmp1       As String
   Dim Tmp2       As String
   Dim i          As Integer
   Dim j          As Integer
   Tmp = "SOS"
   Tmp1 = Tmp1 + "MixChars of [" & Tmp & "] is " & cMorse(Tmp) & Chr$(13) & Chr$(13)
   Tmp = "TIME TO WIN"
   Tmp1 = Tmp1 + "MixChars of [" & Tmp & "] is " & cMorse(Tmp) & Chr$(13) & Chr$(13)
   Tmp = "Nothing can beat the fox"
   Tmp1 = Tmp1 + "MixChars of [" & Tmp & "] is " & cMorse(Tmp) & Chr$(13) & Chr$(13)
   Tmp = Text1.Text
   Tmp1 = Tmp1 + "MixChars of [" & Tmp & "] is " & cMorse(Tmp) & Chr$(13) & Chr$(13)
   cStartBasisTimer
   For i = 1 To Item
      Tmp2 = cMorse(Tmp)
   Next i
   Tmp1 = Tmp1 & "speed for " & Item & " = " & cReadBasisTimer() & " ms"
   Label3.Caption = Tmp1
End Sub
Sub TestMsgBox ()
   Dim i       As Integer
   Dim n       As Integer
   Dim Tmp     As String
   Tmp = "'TIME TO WIN'" & Chr$(13) & Chr$(13)
   Tmp = Tmp & " is a powerfull data link library for using with Visual Basic 3.0 for Windows." & Chr$(13) & Chr$(13)
   Tmp = Tmp & "It looks very better than the standard message box." & Chr$(13) & Chr$(13)
   Tmp = Tmp & "All push buttons are displayed in French." & Chr$(13) & Chr$(13)
   Tmp = Tmp & "The system menu is also in French." & Chr$(13) & Chr$(13)
   Tmp = Tmp & "A TimeOut of 10 seconds has been activated and displayed."
   For i = 0 To 5
      Call cLngBoxMsg(LNG_FRENCH, Tmp, i + (16 * i) + 512 + MB_MESSAGE_CENTER + MB_TIMEOUT_10 + MB_DISPLAY_TIMEOUT, "Message Box in French with TimeOut")
   Next i
End Sub
Sub TestOneCharFromLeft ()
   Dim title      As String
   Dim Tmp        As String
   Dim Tmp1       As String
   Dim Tmp2       As String
   Dim i          As Integer
   Dim j          As Integer
   Tmp = Text1.Text
   title = "The 3,7,1 chars from left of [" & Tmp & "] are " & Chr$(13) & Chr$(13)
   Tmp = Text1.Text
   Tmp1 = title & "3:" & cOneCharFromLeft(Tmp, 3) & " | 7:" & cOneCharFromLeft(Tmp, 7) & " | 1:" & cOneCharFromLeft(Tmp, 1) & Chr$(13) & Chr$(13)
   cStartBasisTimer
   For i = 1 To Item
      Tmp2 = cOneCharFromLeft(Tmp, 2)
   Next i
   Tmp1 = Tmp1 & "speed for " & Item & " = " & cReadBasisTimer() & " ms"
   Label3.Caption = Tmp1
End Sub
Sub TestOneCharFromRight ()
   Dim title      As String
   Dim Tmp        As String
   Dim Tmp1       As String
   Dim Tmp2       As String
   Dim i          As Integer
   Dim j          As Integer
   Tmp = Text1.Text
   title = "The 3,7,1 chars from right of [" & Tmp & "] are " & Chr$(13) & Chr$(13)
   Tmp = Text1.Text
   Tmp1 = title & "3:" & cOneCharFromRight(Tmp, 3) & " | 7:" & cOneCharFromRight(Tmp, 7) & " | 1:" & cOneCharFromRight(Tmp, 1) & Chr$(13) & Chr$(13)
   cStartBasisTimer
   For i = 1 To Item
      Tmp2 = cOneCharFromRight(Tmp, 2)
   Next i
   Tmp1 = Tmp1 & "speed for " & Item & " = " & cReadBasisTimer() & " ms"
   Label3.Caption = Tmp1
End Sub
Sub TestOrToken ()
   Dim title      As String
   Dim Tmp        As String
   Dim Tmp1       As String
   Dim Tmp2       As String
   Dim i          As Integer
   Dim j          As Integer
   Tmp = "FOX|OVER|THE"
   Tmp2 = "THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG"
   Tmp1 = "One of token '" & Tmp & "' in '" & Tmp2 & "' is " & IIf(cOrToken(Tmp2, Tmp), "present", "not present") & Chr$(13) & Chr$(13)
   Tmp = "quick|jumps|the"
   Tmp2 = "THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG"
   Tmp1 = Tmp1 & "One of token '" & Tmp & "' in '" & Tmp2 & "' is " & IIf(cOrToken(Tmp2, Tmp), "present", "not present") & Chr$(13) & Chr$(13)
   Tmp = "FOX\OVER\THE"
   Tmp2 = "THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG"
   Tmp1 = Tmp1 & "One of token '" & Tmp & "' in '" & Tmp2 & "' is " & IIf(cOrTokenIn(Tmp2, Tmp, "\"), "present", "not present") & Chr$(13) & Chr$(13)
   Tmp = "quick\jumps\the"
   Tmp2 = "THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG"
   Tmp1 = Tmp1 & "One of token '" & Tmp & "' in '" & Tmp2 & "' is " & IIf(cOrTokenIn(Tmp2, Tmp, "\"), "present", "not present") & Chr$(13) & Chr$(13)
   Tmp = "FOX/OVER/THE"
   Tmp2 = "THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG"
   Tmp1 = Tmp1 & "One of token '" & Tmp & "' in '" & Tmp2 & "' is " & IIf(cOrTokenIn(Tmp2, Tmp, "\"), "present", "not present") & Chr$(13) & Chr$(13)
   Tmp = "quick\JUMPS\the"
   Tmp2 = "THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG"
   Tmp1 = Tmp1 & "One of token '" & Tmp & "' in '" & Tmp2 & "' is " & IIf(cOrTokenIn(Tmp2, Tmp, "\"), "present", "not present") & Chr$(13) & Chr$(13)
   Tmp = LCase$("quick\jumps\THE")
   Tmp2 = LCase$("THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG")
   Tmp1 = Tmp1 & "One of token '" & Tmp & "' in '" & Tmp2 & "' is " & IIf(cOrTokenIn(Tmp2, Tmp, "\"), "present", "not present") & Chr$(13) & Chr$(13)
   cStartBasisTimer
   For i = 1 To Item
      j = cOrToken(Tmp2, Tmp)
   Next i
   Tmp1 = Tmp1 & "speed for " & Item & " = " & cReadBasisTimer() & " ms"
   Label3.Caption = Tmp1
End Sub
Sub TestPatternExtMatch ()
   Dim title      As String
   Dim Tmp        As String
   Dim Tmp1       As String
   Dim Tmp2       As String
   Dim Tmp3       As String
   Dim i          As Integer
   Dim j          As Integer
   Tmp2 = "Under the blue sky, the sun lights"
   Tmp1 = "PatternExtMatch '" & Tmp2 & "' with" & Chr$(13) & Chr$(13)
   Tmp3 = "*"
   Tmp1 = Tmp1 & "'" & Tmp3 & "'  is " & cPatternExtMatch(Tmp2, Tmp3) & Chr$(13)
   Tmp3 = "*??*???*?"
   Tmp1 = Tmp1 & "'" & Tmp3 & "'  is " & cPatternExtMatch(Tmp2, Tmp3) & Chr$(13)
   Tmp3 = "*Under*"
   Tmp1 = Tmp1 & "'" & Tmp3 & "'  is " & cPatternExtMatch(Tmp2, Tmp3) & Chr$(13)
   Tmp3 = "*sky*"
   Tmp1 = Tmp1 & "'" & Tmp3 & "'  is " & cPatternExtMatch(Tmp2, Tmp3) & Chr$(13)
   Tmp3 = "*lights"
   Tmp1 = Tmp1 & "'" & Tmp3 & "'  is " & cPatternExtMatch(Tmp2, Tmp3) & Chr$(13)
   Tmp3 = "??der*sky*ligh??*"
   Tmp1 = Tmp1 & "'" & Tmp3 & "'  is " & cPatternExtMatch(Tmp2, Tmp3) & Chr$(13)
   Tmp3 = "Under?the * s??,*"
   Tmp1 = Tmp1 & "'" & Tmp3 & "'  is " & cPatternExtMatch(Tmp2, Tmp3) & Chr$(13)
   Tmp3 = "[U-U][a-z][a-z][a-z][a-z]?the *"
   Tmp1 = Tmp1 & "'" & Tmp3 & "'  is " & cPatternExtMatch(Tmp2, Tmp3) & Chr$(13)
   Tmp3 = "[U-U][!A-Z][^A-Z][^A-Z][!A-Z]?the *[s-s]"
   Tmp1 = Tmp1 & "'" & Tmp3 & "'  is " & cPatternExtMatch(Tmp2, Tmp3) & Chr$(13)
   Tmp3 = "~55~6E*~73"
   Tmp1 = Tmp1 & "'" & Tmp3 & "'  is " & cPatternExtMatch(Tmp2, Tmp3) & Chr$(13)
   Tmp3 = "[Uu][Nn][dD][eE][opqrst]?the *[rstu]"
   Tmp1 = Tmp1 & "'" & Tmp3 & "'  is " & cPatternExtMatch(Tmp2, Tmp3) & Chr$(13)
   Tmp3 = "Under?the *[~72~73~74~75]"
   Tmp1 = Tmp1 & "'" & Tmp3 & "'  is " & cPatternExtMatch(Tmp2, Tmp3) & Chr$(13) & Chr$(13)
   Tmp3 = "*under*"
   Tmp1 = Tmp1 & "'" & Tmp3 & "'  is " & cPatternExtMatch(Tmp2, Tmp3) & Chr$(13)
   Tmp3 = "Under*sun"
   Tmp1 = Tmp1 & "'" & Tmp3 & "'  is " & cPatternExtMatch(Tmp2, Tmp3) & Chr$(13)
   Tmp3 = "Under t??e*"
   Tmp1 = Tmp1 & "'" & Tmp3 & "'  is " & cPatternExtMatch(Tmp2, Tmp3) & Chr$(13)
   Tmp3 = "[U-U][!a-z][^A-Z][^A-Z][!A-Z]?the *[!s-s]"
   Tmp1 = Tmp1 & "'" & Tmp3 & "'  is " & cPatternExtMatch(Tmp2, Tmp3) & Chr$(13)
   Tmp3 = "~55~6G*~73"
   Tmp1 = Tmp1 & "'" & Tmp3 & "'  is " & cPatternExtMatch(Tmp2, Tmp3) & Chr$(13)
   Tmp3 = "[Uu][Nn][dD][eE][opqrst]?the *[rStu]"
   Tmp1 = Tmp1 & "'" & Tmp3 & "'  is " & cPatternExtMatch(Tmp2, Tmp3) & Chr$(13)
   Tmp3 = "Under?the *[~72~53~74~75]"
   Tmp1 = Tmp1 & "'" & Tmp3 & "'  is " & cPatternExtMatch(Tmp2, Tmp3) & Chr$(13) & Chr$(13)
   Tmp3 = "Under?the * s??,*"
   cStartBasisTimer
   For i = 1 To Item
      j = cPatternExtMatch(Tmp2, Tmp3)
   Next i
   Tmp1 = Tmp1 & "speed for " & Item & " = " & cReadBasisTimer() & " ms"
   Label3.Caption = Tmp1
End Sub
Sub TestPatternMatch ()
   Dim title      As String
   Dim Tmp        As String
   Dim Tmp1       As String
   Dim Tmp2       As String
   Dim Tmp3       As String
   Dim i          As Integer
   Dim j          As Integer
   Tmp2 = "Under the blue sky, the sun lights"
   Tmp1 = "PatternMatch '" & Tmp2 & "' with" & Chr$(13) & Chr$(13)
   Tmp3 = "*"
   Tmp1 = Tmp1 & "'" & Tmp3 & "'  is " & cPatternMatch(Tmp2, Tmp3) & Chr$(13)
   Tmp3 = "*??*???*?"
   Tmp1 = Tmp1 & "'" & Tmp3 & "'  is " & cPatternMatch(Tmp2, Tmp3) & Chr$(13)
   Tmp3 = "*Under*"
   Tmp1 = Tmp1 & "'" & Tmp3 & "'  is " & cPatternMatch(Tmp2, Tmp3) & Chr$(13)
   Tmp3 = "*sky*"
   Tmp1 = Tmp1 & "'" & Tmp3 & "'  is " & cPatternMatch(Tmp2, Tmp3) & Chr$(13)
   Tmp3 = "*lights"
   Tmp1 = Tmp1 & "'" & Tmp3 & "'  is " & cPatternMatch(Tmp2, Tmp3) & Chr$(13)
   Tmp3 = "??der*sky*ligh??*"
   Tmp1 = Tmp1 & "'" & Tmp3 & "'  is " & cPatternMatch(Tmp2, Tmp3) & Chr$(13)
   Tmp3 = "Under?the * s??,*"
   Tmp1 = Tmp1 & "'" & Tmp3 & "'  is " & cPatternMatch(Tmp2, Tmp3) & Chr$(13) & Chr$(13)
   Tmp3 = "*under*"
   Tmp1 = Tmp1 & "'" & Tmp3 & "'  is " & cPatternMatch(Tmp2, Tmp3) & Chr$(13)
   Tmp3 = "Under*sun"
   Tmp1 = Tmp1 & "'" & Tmp3 & "'  is " & cPatternMatch(Tmp2, Tmp3) & Chr$(13)
   Tmp3 = "Under t??e*"
   Tmp1 = Tmp1 & "'" & Tmp3 & "'  is " & cPatternMatch(Tmp2, Tmp3) & Chr$(13) & Chr$(13)
   Tmp3 = "Under?the * s??,*"
   cStartBasisTimer
   For i = 1 To Item
      j = cPatternMatch(Tmp2, Tmp3)
   Next i
   Tmp1 = Tmp1 & "speed for " & Item & " = " & cReadBasisTimer() & " ms"
   Label3.Caption = Tmp1
End Sub
Sub TestProperName ()
   Dim title      As String
   Dim Tmp        As String
   Dim Tmp1       As String
   Dim Tmp2       As String
   Dim i          As Integer
   Dim j          As Integer
   Tmp = Text1.Text
   Tmp1 = Tmp1 + "ProperName of [" & Tmp & "] is " & cProperName(Tmp) & Chr$(13) & Chr$(13)
   Tmp = "John fitz,jr"
   Tmp1 = Tmp1 + "ProperName of [" & Tmp & "] is " & cProperName(Tmp) & Chr$(13) & Chr$(13)
   Tmp = "john Fitz, jr"
   Tmp1 = Tmp1 + "ProperName of [" & Tmp & "] is " & cProperName(Tmp) & Chr$(13) & Chr$(13)
   Tmp = "macdonald"
   Tmp1 = Tmp1 + "ProperName of [" & Tmp & "] is " & cProperName(Tmp) & Chr$(13) & Chr$(13)
   Tmp = "mac donald"
   Tmp1 = Tmp1 + "ProperName of [" & Tmp & "] is " & cProperName(Tmp) & Chr$(13) & Chr$(13)
   cStartBasisTimer
   For i = 1 To Item
      Tmp2 = cProperName(Tmp)
   Next i
   Tmp1 = Tmp1 & "speed for " & Item & " = " & cReadBasisTimer() & " ms"
   Label3.Caption = Tmp1
End Sub
Sub TestProperName2 ()
   Dim title      As String
   Dim Tmp        As String
   Dim Tmp1       As String
   Dim Tmp2       As String
   Dim i          As Integer
   Dim j          As Integer
   Tmp = Text1.Text
   Tmp1 = Tmp1 + "ProperName2 of '" & Tmp & "' is '" & cProperName2(Tmp, "", 0) & "'" & Chr$(13) & Chr$(13)
   Tmp = "JOHN FITZ,JR"
   Tmp1 = Tmp1 + "ProperName2 of '" & Tmp & "' is '" & cProperName2(Tmp, "", PN_UPPERCASE Or PN_PUNCTUATION) & "'" & Chr$(13) & Chr$(13)
   Tmp = "john Fitz,jr"
   Tmp1 = Tmp1 + "ProperName2 of '" & Tmp & "' is '" & cProperName2(Tmp, "", PN_PUNCTUATION) & "'" & Chr$(13) & Chr$(13)
   Tmp = "macdonald"
   Tmp1 = Tmp1 + "ProperName2 of '" & Tmp & "' is '" & cProperName2(Tmp, "", 0) & "'" & Chr$(13) & Chr$(13)
   Tmp = "mac donald"
   Tmp1 = Tmp1 + "ProperName2 of '" & Tmp & "' is '" & cProperName2(Tmp, "", 0) & "'" & Chr$(13) & Chr$(13)
   Tmp = "a.l. greene jr."
   Tmp1 = Tmp1 + "ProperName2 of '" & Tmp & "' is '" & cProperName2(Tmp, "", PN_PUNCTUATION) & "'" & Chr$(13) & Chr$(13)
   Tmp = "shale and sandstone and till"
   Tmp1 = Tmp1 + "ProperName2 of '" & Tmp & "' is '" & cProperName2(Tmp, "the/of/a/an/and", PN_PUNCTUATION) & "'" & Chr$(13) & Chr$(13)
   Tmp = "a sandstone or a shale"
   Tmp1 = Tmp1 + "ProperName2 of '" & Tmp & "' is '" & cProperName2(Tmp, "the/or/of/a/an/and", PN_PUNCTUATION) & "'" & Chr$(13) & Chr$(13)
   Tmp = "RR2 BARRHEAD"
   Tmp1 = Tmp1 + "ProperName2 of '" & Tmp & "' is '" & cProperName2(Tmp, "rr2", PN_UPPERCASE Or PN_PUNCTUATION Or PN_KEEP_ORIGINAL) & "'" & Chr$(13) & Chr$(13)
   Tmp = "ANDY MACDONALD"
   Tmp1 = Tmp1 + "ProperName2 of '" & Tmp & "' is '" & cProperName2(Tmp, "mac", PN_UPPERCASE Or PN_PUNCTUATION Or PN_KEEP_ORIGINAL Or PN_ONLY_LEADER_SPACE) & "'" & Chr$(13) & Chr$(13)
   cStartBasisTimer
   For i = 1 To Item
      Tmp2 = cProperName2(Tmp, "", 0)
   Next i
   Tmp1 = Tmp1 & "speed for " & Item & " = " & cReadBasisTimer() & " ms"
   Label3.Caption = Tmp1
End Sub
Sub TestRcsCountFileDir ()
   Dim title      As String
   Dim Tmp        As String
   Dim Tmp1       As String
   Dim Tmp2       As String
   Dim i          As Integer
   Dim j          As Integer
   Dim k          As Integer
   Tmp1 = ""
   Tmp1 = Tmp1 & "Total directories in C: is " & cRcsCountFileDir(False, "C:", "", True) & Chr$(13)
   Tmp1 = Tmp1 & "Total directories in D: is " & cRcsCountFileDir(False, "D:", "", True) & Chr$(13)
   Tmp1 = Tmp1 & Chr$(13)
   Tmp1 = Tmp1 & "Total files in C: is " & cRcsCountFileDir(True, "C:", "", True) & Chr$(13)
   Tmp1 = Tmp1 & "Total files in D: is " & cRcsCountFileDir(True, "D:", "", True) & Chr$(13)
   Tmp1 = Tmp1 & Chr$(13)
   Tmp1 = Tmp1 & "Total files in C:*.DAT is " & cRcsCountFileDir(True, "C:", "*.DAT", True) & Chr$(13)
   Tmp1 = Tmp1 & "Total files in D:*.DAT is " & cRcsCountFileDir(True, "D:", "*.DAT", True) & Chr$(13)
   Tmp1 = Tmp1 & Chr$(13)
   Tmp1 = Tmp1 & "Total directories in C:\ is " & cRcsCountFileDir(False, "C:", "", False) & Chr$(13)
   Tmp1 = Tmp1 & "Total directories in D:\ is " & cRcsCountFileDir(False, "D:", "", False) & Chr$(13)
   Tmp1 = Tmp1 & Chr$(13)
   Tmp1 = Tmp1 & "Total files in C:\ is " & cRcsCountFileDir(True, "C:", "", False) & Chr$(13)
   Tmp1 = Tmp1 & "Total files in D:\ is " & cRcsCountFileDir(True, "D:", "", False) & Chr$(13)
   Tmp1 = Tmp1 & Chr$(13)
   Tmp1 = Tmp1 & "Total files in C:\*.DAT is " & cRcsCountFileDir(True, "C:", "*.DAT", False) & Chr$(13)
   Tmp1 = Tmp1 & "Total files in D:\*.DAT is " & cRcsCountFileDir(True, "D:", "*.DAT", False) & Chr$(13)
   Tmp1 = Tmp1 & Chr$(13)
   cStartBasisTimer
   For i = 1 To 10
      k = cRcsCountFileDir(False, "C:", "", False)
   Next i
   Tmp1 = Tmp1 & "speed for " & 10 & " = " & cReadBasisTimer() & " ms"
   Label3.Caption = Tmp1
End Sub
Sub TestRcsFilesSize ()
   Dim title      As String
   Dim Tmp        As String
   Dim Tmp1       As String
   Dim Tmp2       As String
   Dim i          As Integer
   Dim j          As Integer
   Dim k          As Long
   Dim Size1      As Long
   Dim Size2      As Long
   Tmp1 = ""
   Tmp1 = Tmp1 & "Size of files c:\*.* is " & cRcsFilesSize("c:\", "*.*", False) & Chr$(13)
   Tmp1 = Tmp1 & "Size of files c:\*.exe is " & cRcsFilesSize("c:\", "*.exe", False) & Chr$(13)
   Tmp1 = Tmp1 & "Size of files c:\*.com is " & cRcsFilesSize("c:\", "*.com", False) & Chr$(13)
   Tmp1 = Tmp1 & Chr$(13)
   Tmp1 = Tmp1 & "Size of files c:\*.* on disk is " & cRcsFilesSizeOnDisk("c:\", "*.*", False) & Chr$(13)
   Tmp1 = Tmp1 & "Size of files c:\*.exe on disk is " & cRcsFilesSizeOnDisk("c:\", "*.exe", False) & Chr$(13)
   Tmp1 = Tmp1 & "Size of files c:\*.com on disk is " & cRcsFilesSizeOnDisk("c:\", "*.com", False) & Chr$(13)
   Tmp1 = Tmp1 & Chr$(13)
   Tmp1 = Tmp1 & "Slack of files c:\*.* on disk is " & cRcsFilesSlack("c:\", "*.*", False, Size1, Size2) & " %" & Chr$(13)
   Tmp1 = Tmp1 & "Slack of files c:\*.exe on disk is " & cRcsFilesSlack("c:\", "*.exe", False, Size1, Size2) & " %" & Chr$(13)
   Tmp1 = Tmp1 & "Slack of files c:\*.com on disk is " & cRcsFilesSlack("c:\", "*.com", False, Size1, Size2) & " %" & Chr$(13)
   Tmp1 = Tmp1 & Chr$(13)
   Tmp1 = Tmp1 & "Size of files starting with c:\*.* is " & cRcsFilesSize("c:\", "*.*", True) & Chr$(13)
   Tmp1 = Tmp1 & "Size of files starting with c:\*.exe is " & cRcsFilesSize("c:\", "*.exe", True) & Chr$(13)
   Tmp1 = Tmp1 & "Size of files starting with c:\*.com is " & cRcsFilesSize("c:\", "*.com", True) & Chr$(13)
   Tmp1 = Tmp1 & Chr$(13)
   Tmp1 = Tmp1 & "Size of files starting with c:\*.* on disk is " & cRcsFilesSizeOnDisk("c:\", "*.*", True) & Chr$(13)
   Tmp1 = Tmp1 & "Size of files starting with c:\*.exe on disk is " & cRcsFilesSizeOnDisk("c:\", "*.exe", True) & Chr$(13)
   Tmp1 = Tmp1 & "Size of files starting with c:\*.com on disk is " & cRcsFilesSizeOnDisk("c:\", "*.com", True) & Chr$(13)
   Tmp1 = Tmp1 & Chr$(13)
   Tmp1 = Tmp1 & "Slack of files starting with c:\*.* on disk is " & cRcsFilesSlack("c:\", "*.*", True, Size1, Size2) & " %" & Chr$(13)
   Tmp1 = Tmp1 & "Slack of files starting with c:\*.exe on disk is " & cRcsFilesSlack("c:\", "*.exe", True, Size1, Size2) & " %" & Chr$(13)
   Tmp1 = Tmp1 & "Slack of files starting with c:\*.com on disk is " & cRcsFilesSlack("c:\", "*.com", True, Size1, Size2) & " %" & Chr$(13)
   Tmp1 = Tmp1 & Chr$(13)
   cStartBasisTimer
   For i = 1 To 10
      k = cRcsFilesSize("c:\", "*.*", False)
   Next i
   Tmp1 = Tmp1 & "speed for " & 10 & " = " & cReadBasisTimer() & " ms"
   Label3.Caption = Tmp1
End Sub
Sub TestReadLanguage ()
   Load frmLng
   Call cShowWindow(frmLng.hWnd, 1, 340)
   frmLng.Show
End Sub
Sub TestRegistrationKey ()
   Dim title      As String
   Dim Tmp        As String
   Dim Tmp1       As String
   Dim Tmp2       As String
   Dim Tmp3       As String
   Dim i          As Integer
   Dim j          As Long
   Tmp2 = "TIME TO WIN"
   Tmp3 = "12345"
   Tmp = Text1.Text
   Tmp1 = "Registration key for '" & Tmp2 & "' with '" & Tmp3 & "' is " & cRegistrationKey(Tmp2, Val(Tmp3)) & Chr$(13) & Chr$(13)
   Tmp1 = Tmp1 & "Registration key for '" & cBlockCharFromLeft(Tmp2, 1) & "n" & "' with '" & Tmp3 & "' is " & cRegistrationKey(cBlockCharFromLeft(Tmp2, 1) + "n", Val(Tmp3)) & Chr$(13) & Chr$(13)
   Tmp1 = Tmp1 & "Registration key for '" & Tmp & "' with '" & Tmp3 & "' is " & cRegistrationKey(Tmp, Val(Tmp3)) & Chr$(13) & Chr$(13)
   Tmp1 = Tmp1 & "Registration key for '" & LCase$(Tmp2) & "' with '" & Tmp3 & "' is " & cRegistrationKey(LCase$(Tmp2), Val(Tmp3)) & Chr$(13) & Chr$(13)
   Tmp1 = Tmp1 & "Registration key for '" & LCase$(Tmp) & "' with '" & Tmp3 & "' is " & cRegistrationKey(LCase$(Tmp), Val(Tmp3)) & Chr$(13) & Chr$(13)
   Tmp1 = Tmp1 & "Registration key for '" & Left$(Tmp2, 3) & "' with '" & Tmp3 & "' is " & cRegistrationKey(Left$(Tmp2, 3), Val(Tmp3)) & Chr$(13) & Chr$(13)
   cStartBasisTimer
   For i = 1 To Item
      j = cRegistrationKey(Tmp2, Val(Tmp3))
   Next i
   Tmp1 = Tmp1 & "speed for " & Item & " = " & cReadBasisTimer() & " ms"
   Label3.Caption = Tmp1
End Sub
Sub TestRemoveBlockChar ()
   Dim title      As String
   Dim Tmp        As String
   Dim Tmp1       As String
   Dim Tmp2       As String
   Dim i          As Integer
   Dim j          As Integer
   Tmp = Text1.Text
   title = "Removing 3 chars from the 7 of [" & Tmp & "] is "
   Tmp = cRemoveBlockChar(Tmp, 7, 3)
   Tmp1 = title & Tmp & Chr$(13) & Chr$(13)
   cStartBasisTimer
   For i = 1 To Item
      Tmp = cRemoveBlockChar(Tmp, 1, 2)
   Next i
   Tmp1 = Tmp1 & "speed for " & Item & " = " & cReadBasisTimer() & " ms"
   Label3.Caption = Tmp1
End Sub
Sub TestRemoveOneChar ()
   Dim title      As String
   Dim Tmp        As String
   Dim Tmp1       As String
   Dim Tmp2       As String
   Dim i          As Integer
   Dim j          As Integer
   Tmp = Text1.Text
   title = "Removing the 7 char of [" & Tmp & "] is "
   Tmp = cRemoveOneChar(Tmp, 7)
   Tmp1 = title & Tmp & Chr$(13) & Chr$(13)
   cStartBasisTimer
   For i = 1 To Item
      Tmp = cRemoveOneChar(Tmp, 1)
   Next i
   Tmp1 = Tmp1 & "speed for " & Item & " = " & cReadBasisTimer() & " ms"
   Label3.Caption = Tmp1
End Sub
Sub TestRenameFile ()
   Dim title      As String
   Dim Tmp        As String
   Dim Tmp1       As String
   Dim Tmp2       As String
   Dim i          As Integer
   Dim j          As Integer
   j = cKillFile("XY~YX~XY.~~~")
   j = cKillFile("XY-YX-XY.---")
   Close #1
   Open "XY~YX~XY.~~~" For Output As #1
   Print #1, "this is a test";
   Close #1
   Tmp1 = "File XY~YX~XY.~~~ " & IIf(cRenameFile("XY~YX~XY.~~~", "XY-YX-XY.---") = True, "renamed in XY-YX-XY.---", "is not renamed") & Chr$(13) & Chr$(13)
   cStartBasisTimer
   For i = 1 To ItemFile
      j = cRenameFile("XY~YX~XY.~~~", "XY-YX-XY.---")
   Next i
   Tmp1 = Tmp1 & "speed for " & ItemFile & " = " & cReadBasisTimer() & " ms"
   Label3.Caption = Tmp1
End Sub
Sub TestResizeString ()
   Dim title      As String
   Dim Tmp        As String
   Dim Tmp1       As String
   Dim Tmp2       As String
   Dim i          As Integer
   Dim j          As Integer
   Tmp = Text1.Text
   Tmp1 = Tmp & " is resized from " & Len(Tmp) & " to 5 chars " & cResizeString(Tmp, 5) & Chr$(13) & Chr$(13)
   cStartBasisTimer
   For i = 1 To Item
      Tmp2 = cResizeString(Tmp, 3)
   Next i
   Tmp1 = Tmp1 & "speed for " & Item & " = " & cReadBasisTimer() & " ms"
   Label3.Caption = Tmp1
End Sub
Sub TestResizeStringAndFill ()
   Dim title      As String
   Dim Tmp        As String
   Dim Tmp1       As String
   Dim Tmp2       As String
   Dim i          As Integer
   Dim j          As Integer
   Tmp = Text1.Text
   Tmp1 = Tmp & " is resized from " & Len(Tmp) & " to 35 chars and lengthened with @ is " & Chr$(13) & Chr$(13) & cResizeStringAndFill(Tmp, 35, "@") & Chr$(13) & Chr$(13)
   cStartBasisTimer
   For i = 1 To Item
      Tmp2 = cResizeStringAndFill(Tmp, 35, "@")
   Next i
   Tmp1 = Tmp1 & "speed for " & Item & " = " & cReadBasisTimer() & " ms"
   Label3.Caption = Tmp1
End Sub
Sub TestReverse ()
   Dim title      As String
   Dim Tmp        As String
   Dim Tmp1       As String
   Dim Tmp2       As String
   Dim i          As Integer
   Dim j          As Integer
   Tmp = Text1.Text
   title = "Reverse of [" & Tmp & "] is "
   Tmp1 = title & cReverse(Tmp) & Chr$(13) & Chr$(13)
   cStartBasisTimer
   For i = 1 To Item
      Tmp2 = cReverse(Tmp)
   Next i
   Tmp1 = Tmp1 & "speed for " & Item & " = " & cReadBasisTimer() & " ms"
   Label3.Caption = Tmp1
End Sub
Sub TestReverseAllBits ()
   Dim title      As String
   Dim Tmp        As String
   Dim Tmp1       As String
   Dim Tmp2       As String
   Dim i          As Integer
   Dim j          As Integer
   Tmp = Text1.Text
   title = "Reverse all bits of [" & Tmp & "] is "
   Call cReverseAllBits(Tmp)
   Tmp1 = title & Tmp & Chr$(13) & Chr$(13)
   title = "Reverse all bits of [" & Tmp & "] is "
   Call cReverseAllBits(Tmp)
   Tmp1 = Tmp1 & title & Tmp & Chr$(13) & Chr$(13)
   cStartBasisTimer
   For i = 1 To Item
      Call cReverseAllBits(Tmp)
   Next i
   Tmp1 = Tmp1 & "speed for " & Item & " = " & cReadBasisTimer() & " ms"
   Label3.Caption = Tmp1
End Sub
Sub TestReverseAllBitsByChar ()
   Dim title      As String
   Dim Tmp        As String
   Dim Tmp1       As String
   Dim Tmp2       As String
   Dim i          As Integer
   Dim j          As Integer
   Tmp = Text1.Text
   title = "Reverse all bits by char of [" & Tmp & "] is "
   Call cReverseAllBitsByChar(Tmp)
   Tmp1 = title & Tmp & Chr$(13) & Chr$(13)
   title = "Reverse all bits by char of [" & Tmp & "] is "
   Call cReverseAllBitsByChar(Tmp)
   Tmp1 = Tmp1 & title & Tmp & Chr$(13) & Chr$(13)
   cStartBasisTimer
   For i = 1 To Item
      Call cReverseAllBitsByChar(Tmp)
   Next i
   Tmp1 = Tmp1 & "speed for " & Item & " = " & cReadBasisTimer() & " ms"
   Label3.Caption = Tmp1
End Sub
Sub TestReverseSortI ()
   Dim title      As String
   Dim Tmp        As String
   Dim Tmp1       As String
   Dim Tmp2       As String
   Dim i          As Integer
   Dim j          As Integer
   Dim m          As Integer
   ReDim array(ItemMean) As Integer
   Randomize Timer
   For i = LBound(array) To UBound(array)
      array(i) = RandI * Rnd(1)
      List1.AddItem "" & array(i)
   Next i
   j = cReverseSortI(array())
   For i = LBound(array) To UBound(array)
      List2.AddItem "" & array(i)
   Next i
   cStartBasisTimer
   For i = 1 To ItemFile
      j = cReverseSortI(array())
   Next i
   Tmp1 = Tmp1 & "speed for " & ItemFile & " = " & cReadBasisTimer() & " ms"
   Label3.Caption = Tmp1
End Sub
Sub TestRndX ()
   Dim title      As String
   Dim Tmp        As String
   Dim Tmp1       As String
   Dim Tmp2       As String
   Dim i          As Integer
   Dim j          As Integer
   Call cRndInit(-1)
   Tmp1 = "Some random Integer number" & Chr$(13) & Chr$(13)
   For i = 1 To 2
      Tmp1 = Tmp1 & cRndI() & Chr$(13)
   Next i
   Tmp1 = Tmp1 & Chr$(13)
   Tmp1 = Tmp1 & "Some random Long number" & Chr$(13) & Chr$(13)
   For i = 1 To 2
      Tmp1 = Tmp1 & cRndL() & Chr$(13)
   Next i
   Tmp1 = Tmp1 & Chr$(13)
   Tmp1 = Tmp1 & "Some random Single number" & Chr$(13) & Chr$(13)
   For i = 1 To 2
      Tmp1 = Tmp1 & cRndS() & Chr$(13)
   Next i
   Tmp1 = Tmp1 & Chr$(13)
   Tmp1 = Tmp1 & "Some random Double number" & Chr$(13) & Chr$(13)
   For i = 1 To 2
      Tmp1 = Tmp1 & cRndD() & Chr$(13)
   Next i
   Tmp1 = Tmp1 & Chr$(13)
   Tmp1 = Tmp1 & "Some random Double number between 0.0 and 1.0" & Chr$(13) & Chr$(13)
   For i = 1 To 2
      Tmp1 = Tmp1 & cRnd() & Chr$(13)
   Next i
   Tmp1 = Tmp1 & Chr$(13)
   cStartBasisTimer
   For i = 1 To Item
      j = cRndI()
   Next i
   Tmp1 = Tmp1 & "speed for " & Item & " = " & cReadBasisTimer() & " ms"
   Label3.Caption = Tmp1
End Sub
Sub TestRtoA ()
   Dim Tmp        As String
   Dim Tmp1       As String
   Tmp = UCase$(cArabicToRoman(Year(Int(Now))))
   Tmp1 = Tmp & " in Arabic is " & cRomanToArabic(LCase$(Tmp)) & Chr$(13)
   Tmp = UCase$(cArabicToRoman(Year(Int(Now)) - 1))
   Tmp1 = Tmp1 & Tmp & " in Arabic is " & cRomanToArabic(LCase$(Tmp)) & Chr$(13)
   Tmp = UCase$(cArabicToRoman(Year(Int(Now)) + 1))
   Tmp1 = Tmp1 & Tmp & " in Arabic is " & cRomanToArabic(LCase$(Tmp)) & Chr$(13)
   Label3.Caption = Tmp1
End Sub
Sub TestRUBYencrypt (Mode As Integer)
   Dim lngResult        As Long
   Dim strResult        As String
   Dim strDisplay       As String
   Dim i                As Integer
   Dim Str1             As String
   Dim Str2             As String
   Dim Key              As String
   Dim DescMode         As String
   strResult = ""
   strDisplay = ""
   Select Case Mode
      Case RUBY_MODE_MINIMUM: DescMode = "RUBY - minimum"
      Case RUBY_MODE_DESK_LOCK: DescMode = "RUBY - desk lock"
      Case RUBY_MODE_DEAD_BOLT: DescMode = "RUBY - dead bolt"
      Case RUBY_MODE_PORTABLE_SAFE: DescMode = "RUBY - portable safe"
      Case RUBY_MODE_ANCHORED_SAFE: DescMode = "RUBY - anchored safe"
      Case RUBY_MODE_BANK_VAULT: DescMode = "RUBY - bank vault"
      Case RUBY_MODE_FORT_KNOX: DescMode = "RUBY - FORT KNOX"
   End Select
   strDisplay = strDisplay & DescMode & Chr$(13) & Chr$(13)
   Key = "1234567890123456"
   Str1 = "TIME TO WIN"
   Str2 = cRUBYencrypt(Str1, Key, Mode)
   strDisplay = strDisplay & "encrypt [" & Str1 & "] with '?' is [" & cFilterChars(Str2, Chr$(0)) & "]" & Chr$(13)
   strDisplay = strDisplay & "decrypt [" & cFilterChars(Str2, Chr$(0)) & "] with '?' is [" & cRUBYdecrypt(Str2, Key, Mode) & "]" & Chr$(13)
   strDisplay = strDisplay & Chr$(13)
   Str1 = "TIME2WIN a DLL for VB 3.0"
   Str2 = cRUBYencrypt(Str1, Key, Mode)
   strDisplay = strDisplay & "encrypt [" & Str1 & "] with '?' is [" & cFilterChars(Str2, Chr$(0)) & "]" & Chr$(13)
   strDisplay = strDisplay & "decrypt [" & cFilterChars(Str2, Chr$(0)) & "] with '?' is [" & cRUBYdecrypt(Str2, Key, Mode) & "]" & Chr$(13)
   strDisplay = strDisplay & Chr$(13)
   Str1 = "Under the sky, the sun lights"
   Str2 = cRUBYencrypt(Str1, Key, Mode)
   strDisplay = strDisplay & "encrypt [" & Str1 & "] with '?' is [" & cFilterChars(Str2, Chr$(0)) & "]" & Chr$(13)
   strDisplay = strDisplay & "decrypt [" & cFilterChars(Str2, Chr$(0)) & "] with '?' is [" & cRUBYdecrypt(Str2, Key, Mode) & "]" & Chr$(13)
   strDisplay = strDisplay & Chr$(13)
   Str1 = "the fox jump over over the lazy dogs"
   Str2 = cRUBYencrypt(Str1, Key, Mode)
   strDisplay = strDisplay & "encrypt [" & Str1 & "] with '?' is [" & cFilterChars(Str2, Chr$(0)) & "]" & Chr$(13)
   strDisplay = strDisplay & "decrypt [" & cFilterChars(Str2, Chr$(0)) & "] with '?' is [" & cRUBYdecrypt(Str2, Key, Mode) & "]" & Chr$(13)
   strDisplay = strDisplay & Chr$(13)
   'time the function
   cStartBasisTimer
   For i = 1 To Item
      strResult = cRUBYencrypt(Str1, Key, Mode)
   Next i
   strDisplay = strDisplay & "speed for " & Item & " = " & cReadBasisTimer() & " ms"
   Label3.Caption = strDisplay
End Sub
Sub TestRUBYencryptFile (Mode As Integer)
   Dim lngResult        As Long
   Dim strResult        As String
   Dim strDisplay       As String
   Dim i                As Integer
   Dim File1            As String
   Dim File2            As String
   Dim File3            As String
   Dim Key              As String
   Dim DescMode         As String
   strResult = ""
   strDisplay = ""
   Select Case Mode
      Case RUBY_MODE_MINIMUM: DescMode = "RUBY - minimum"
      Case RUBY_MODE_DESK_LOCK: DescMode = "RUBY - desk lock"
      Case RUBY_MODE_DEAD_BOLT: DescMode = "RUBY - dead bolt"
      Case RUBY_MODE_PORTABLE_SAFE: DescMode = "RUBY - portable safe"
      Case RUBY_MODE_ANCHORED_SAFE: DescMode = "RUBY - anchored safe"
      Case RUBY_MODE_BANK_VAULT: DescMode = "RUBY - bank vault"
      Case RUBY_MODE_FORT_KNOX: DescMode = "RUBY - FORT KNOX"
   End Select
   strDisplay = strDisplay & DescMode & Chr$(13) & Chr$(13)
   File1 = "c:\autoexec.bat"
   File2 = "c:\autoexec.rub"
   File3 = "c:\autoexec.bur"
   Key = "1234567890123456"
   strDisplay = strDisplay & "encryptFile '" & File1 & "' with '?' to '" & File2 & "' is " & cRUBYencryptFile(File1, File2, Key, Mode) & Chr$(13)
   strDisplay = strDisplay & "decryptFile '" & File2 & "' with '?' to '" & File3 & "' is " & cRUBYdecryptFile(File2, File3, Key, Mode) & Chr$(13)
   strDisplay = strDisplay & "Compare (ns) '" & File1 & "' with '" & File3 & "' is " & IIf(cCmpFileContents(File1, File3, False) = -1, "same", "not same") & Chr$(13) & Chr$(13)
   cStartBasisTimer
   For i = 1 To Item
      lngResult = cRUBYencryptFile(File1, File2, Key, Mode)
   Next i
   strDisplay = strDisplay & "speed for " & Item & " = " & cReadBasisTimer() & " ms"
   Label3.Caption = strDisplay
End Sub
Sub TestSearchI ()
   Dim title      As String
   Dim Tmp        As String
   Dim Tmp1       As String
   Dim Tmp2       As String
   Dim i          As Integer
   Dim j          As Integer
   Dim m          As Integer
   ReDim array(20) As Integer
   Call cRndInit(-1)
   For i = LBound(array) To UBound(array)
      array(i) = cRndI()
      List1.AddItem "" & array(i)
   Next i
   Tmp1 = Tmp1 & "Search '" & array(5) & "' is " & cSearchI(array(), array(5)) & Chr$(13)
   Tmp1 = Tmp1 & "Search '" & array(10) & "' is " & cSearchI(array(), array(10)) & Chr$(13)
   Tmp1 = Tmp1 & "Search '" & array(15) & "' is " & cSearchI(array(), array(15)) & Chr$(13)
   Tmp1 = Tmp1 & "Search '" & array(20) & "' is " & cSearchI(array(), array(20)) & Chr$(13)
   Tmp1 = Tmp1 & "Search '" & -1234 & "' is " & cSearchI(array(), -1234) & Chr$(13)
   cStartBasisTimer
   For i = 1 To ItemFile
      j = cSearchI(array(), array(1))
   Next i
   Tmp1 = Tmp1 & "speed for " & ItemFile & " = " & cReadBasisTimer() & " ms"
   Label3.Caption = Tmp1
End Sub
Sub TestSerial ()
   Dim Tmp           As String
   Dim Tmp1          As String
   Dim getSD         As tagSERIALDATA
   Dim putSD         As tagSERIALDATA
   Dim i             As Integer
   Dim j             As Integer
   Call CreateFile
   Tmp1 = "TEST.DAT"
   Tmp = Tmp & "File '" & Tmp1 & "' is " & IIf(cIsSerial(Tmp1) = True, "serialized", "not serialized") & Chr$(13) & Chr$(13)
   putSD.Description1 = "TIME TO WIN demonstration"
   putSD.Description2 = "Under the blue sky, the sun lights"
   putSD.Number = 136
   Tmp = Tmp & "Put/Modify '" & Trim$(putSD.Description1) & "' - '" & Trim$(putSD.Description2) & "' - '" & putSD.Number & "'" & Chr$(13) & "into file '" & Tmp1 & "' is " & IIf(cSerialPut(Tmp1, putSD), "OK", "KO") & Chr$(13)
   i = cSerialGet(Tmp1, getSD)
   Tmp = Tmp & "Get from '" & Tmp1 & "' is : " & Chr$(13)
   Tmp = Tmp & "  description 1 : " & Trim$(getSD.Description1) & Chr$(13)
   Tmp = Tmp & "  description 2 : " & Trim$(getSD.Description2) & Chr$(13)
   Tmp = Tmp & "  number : " & getSD.Number & Chr$(13) & Chr$(13)
   Tmp = Tmp & "Add 2 to serialized number part into file '" & Tmp1 & "' is " & IIf(cSerialInc(Tmp1, 2), "OK", "KO") & Chr$(13)
   i = cSerialGet(Tmp1, getSD)
   Tmp = Tmp & "Get from '" & Tmp1 & "' is : " & Chr$(13)
   Tmp = Tmp & "  description 1 : " & Trim$(getSD.Description1) & Chr$(13)
   Tmp = Tmp & "  description 2 : " & Trim$(getSD.Description2) & Chr$(13)
   Tmp = Tmp & "  number : " & getSD.Number & Chr$(13) & Chr$(13)
   Tmp = Tmp & "Substract 9 to serialized number part into file '" & Tmp1 & "' is " & IIf(cSerialInc(Tmp1, -9), "OK", "KO") & Chr$(13)
   i = cSerialGet(Tmp1, getSD)
   Tmp = Tmp & "Get from '" & Tmp1 & "' is : " & Chr$(13)
   Tmp = Tmp & "  description 1 : " & Trim$(getSD.Description1) & Chr$(13)
   Tmp = Tmp & "  description 2 : " & Trim$(getSD.Description2) & Chr$(13)
   Tmp = Tmp & "  number : " & getSD.Number & Chr$(13) & Chr$(13)
   Tmp = Tmp & "File '" & Tmp1 & "' is " & IIf(cIsSerial(Tmp1) = True, "serialized", "not serialized") & Chr$(13) & Chr$(13)
   cStartBasisTimer
   For i = 1 To ItemFile
      j = cSerialGet(Tmp1, getSD)
   Next i
   Tmp = Tmp & "speed for " & ItemFile & " = " & cReadBasisTimer() & " ms"
   Label3.Caption = Tmp
End Sub
Sub TestSetAllBits ()
   Dim title      As String
   Dim Tmp        As String
   Dim Tmp1       As String
   Dim Tmp2       As String
   Dim i          As Integer
   Dim j          As Integer
   Tmp = Text1.Text
   title = "Set all bits of [" & Tmp & "] on True is "
   Call cSetAllBits(Tmp, True)
   Tmp1 = title & "[" & Tmp & "] " & Chr$(13) & Chr$(13)
   title = "Set all bits of [" & Tmp & "] on False is "
   Call cSetAllBits(Tmp, False)
   Tmp1 = Tmp1 & title & "[" & Tmp & "] " & Chr$(13) & Chr$(13)
   cStartBasisTimer
   For i = 1 To Item
      Call cSetAllBits(Tmp, True)
   Next i
   Tmp1 = Tmp1 & "speed for " & Item & " = " & cReadBasisTimer() & " ms"
   Label3.Caption = Tmp1
End Sub
Sub TestSetBit ()
   Dim title      As String
   Dim Tmp        As String
   Dim Tmp1       As String
   Dim Tmp2       As String
   Dim i          As Integer
   Dim j          As Integer
   Tmp = Text1.Text
   title = "Set bit 0,5,3 of [" & Tmp & "] on True is "
   Call cSetBit(Tmp, 0, True)
   Call cSetBit(Tmp, 5, True)
   Call cSetBit(Tmp, 3, True)
   Tmp1 = Tmp1 & title & "[" & Tmp & "] " & Chr$(13) & Chr$(13)
   title = "Set bit 22,30,38 of [" & Tmp & "] on False is "
   Call cSetBit(Tmp, 22, False)
   Call cSetBit(Tmp, 30, False)
   Call cSetBit(Tmp, 38, False)
   Tmp1 = Tmp1 & title & "[" & Tmp & "] " & Chr$(13) & Chr$(13)
   title = "Set bit 0,5,3 of [" & Tmp & "] on False is "
   Call cSetBit(Tmp, 0, False)
   Call cSetBit(Tmp, 5, False)
   Call cSetBit(Tmp, 3, False)
   Tmp1 = Tmp1 & title & "[" & Tmp & "] " & Chr$(13) & Chr$(13)
   title = "Set bit 22,30,38 of [" & Tmp & "] on True is "
   Call cSetBit(Tmp, 22, True)
   Call cSetBit(Tmp, 30, True)
   Call cSetBit(Tmp, 38, True)
   Tmp1 = Tmp1 & title & "[" & Tmp & "] " & Chr$(13) & Chr$(13)
   cStartBasisTimer
   For i = 1 To Item
      Call cSetBit(Tmp, 7, True)
   Next i
   Tmp1 = Tmp1 & "speed for " & Item & " = " & cReadBasisTimer() & " ms"
   Label3.Caption = Tmp1
End Sub
Sub TestSetBitValue ()
   Dim intResult        As Integer
   Dim strResult        As String
   Dim strDisplay       As String
   Dim iData            As Integer
   Dim lData            As Long
   Dim sData            As Single
   Dim dData            As Double
   Dim i                As Integer
   intResult = 0
   strResult = ""
   strDisplay = ""
   iData = Abs(cRndI())
   lData = Abs(cRndL())
   sData = Abs(cRndS())
   dData = Abs(cRndD())
     
   strDisplay = strDisplay + "Integer value : " & iData & " (" & cToBinary(cMKI(iData)) & ")" & Chr$(13)
   Call cSetBitI(iData, 3, True)
   strDisplay = strDisplay + "   set bit 3 is " & iData & " (" & cToBinary(cMKI(iData)) & ")" & Chr$(13)
   Call cSetBitI(iData, 6, False)
   strDisplay = strDisplay + "   reset bit 6 is " & iData & " (" & cToBinary(cMKI(iData)) & ")" & Chr$(13)
   Call cSetBitI(iData, 9, True)
   strDisplay = strDisplay + "   set bit 9 is " & iData & " (" & cToBinary(cMKI(iData)) & ")" & Chr$(13) & Chr$(13)
   strDisplay = strDisplay + "Long value : " & lData & " (" & cToBinary(cMKL(lData)) & ")" & Chr$(13)
   Call cSetBitL(lData, 6, True)
   strDisplay = strDisplay + "   set bit 6 is " & lData & " (" & cToBinary(cMKL(lData)) & ")" & Chr$(13)
   Call cSetBitL(lData, 12, False)
   strDisplay = strDisplay + "   reset bit 12 is " & lData & " (" & cToBinary(cMKL(lData)) & ")" & Chr$(13)
   Call cSetBitL(lData, 24, True)
   strDisplay = strDisplay + "   set bit 24 is " & lData & " (" & cToBinary(cMKL(lData)) & ")" & Chr$(13) & Chr$(13)
   strDisplay = strDisplay + "Single value : " & sData & " (" & cToBinary(cMKS(sData)) & ")" & Chr$(13)
   Call cSetBitS(sData, 0, True)
   strDisplay = strDisplay + "   set bit 0 is " & sData & " (" & cToBinary(cMKS(sData)) & ")" & Chr$(13)
   Call cSetBitS(sData, 3, True)
   strDisplay = strDisplay + "   set bit 3 is " & sData & " (" & cToBinary(cMKS(sData)) & ")" & Chr$(13)
   Call cSetBitS(sData, 6, True)
   strDisplay = strDisplay + "   set bit 6 is " & sData & " (" & cToBinary(cMKS(sData)) & ")" & Chr$(13)
   Call cSetBitS(sData, 12, True)
   strDisplay = strDisplay + "   set bit 12 is " & sData & " (" & cToBinary(cMKS(sData)) & ")" & Chr$(13)
   Call cSetBitS(sData, 24, True)
   strDisplay = strDisplay + "   set bit 24 is " & sData & " (" & cToBinary(cMKS(sData)) & ")" & Chr$(13) & Chr$(13)
   strDisplay = strDisplay + "Double value : " & dData & " (" & cToBinary(cMKD(dData)) & ")" & Chr$(13)
   Call cSetBitD(dData, 0, False)
   strDisplay = strDisplay + "   reset bit 0 is " & dData & " (" & cToBinary(cMKD(dData)) & ")" & Chr$(13)
   Call cSetBitD(dData, 3, False)
   strDisplay = strDisplay + "   reset bit 3 is " & dData & " (" & cToBinary(cMKD(dData)) & ")" & Chr$(13)
   Call cSetBitD(dData, 12, False)
   strDisplay = strDisplay + "   reset bit 12 is " & dData & " (" & cToBinary(cMKD(dData)) & ")" & Chr$(13)
   Call cSetBitD(dData, 24, False)
   strDisplay = strDisplay + "   reset bit 24 is " & dData & " (" & cToBinary(cMKD(dData)) & ")" & Chr$(13)
   Call cSetBitD(dData, 48, False)
   strDisplay = strDisplay + "   reset bit 48 is " & dData & " (" & cToBinary(cMKD(dData)) & ")" & Chr$(13) & Chr$(13)
   'time the function
   cStartBasisTimer
   For i = 1 To ItemFile
      Call cSetBitI(iData, 0, True)
   Next i
   strDisplay = strDisplay & "speed for " & ItemFile & " = " & cReadBasisTimer() & " ms"
   Label3.Caption = strDisplay
End Sub
Sub TestSetI ()
   Dim title      As String
   Dim Tmp        As String
   Dim Tmp1       As String
   Dim Tmp2       As String
   Dim i          As Integer
   Dim j          As Integer
   Dim m          As Double
   ReDim array(ItemMean) As Integer
   Randomize Timer
   For i = LBound(array) To UBound(array)
      array(i) = 0
      List1.AddItem "" & array(i)
   Next i
   j = cSetI(array(), 1024)
   For i = LBound(array) To UBound(array)
      List2.AddItem "" & array(i)
   Next i
   Tmp1 = Tmp1 & "Set 1024 to element 1 of an integer array is : " & array(1) & Chr$(13) & Chr$(13)
   Tmp1 = Tmp1 & "Set 1024 to element " & ItemMean & " of an integer array is : " & array(ItemMean) & Chr$(13) & Chr$(13)
   cStartBasisTimer
   For i = 1 To ItemFile
      j = cSetI(array(), 1.11)
   Next i
   Tmp1 = Tmp1 & "speed for " & ItemFile & " = " & cReadBasisTimer() & " ms"
   Label3.Caption = Tmp1
End Sub
Sub TestSortI ()
   Dim title      As String
   Dim Tmp        As String
   Dim Tmp1       As String
   Dim Tmp2       As String
   Dim i          As Integer
   Dim j          As Integer
   Dim m          As Integer
   ReDim array(ItemMean) As Integer
   Randomize Timer
   For i = LBound(array) To UBound(array)
      array(i) = RandI * Rnd(1)
      List1.AddItem "" & array(i)
   Next i
   j = cSortI(array())
   For i = LBound(array) To UBound(array)
      List2.AddItem "" & array(i)
   Next i
   cStartBasisTimer
   For i = 1 To ItemFile
      j = cSortI(array())
   Next i
   Tmp1 = Tmp1 & "speed for " & ItemFile & " = " & cReadBasisTimer() & " ms"
   Label3.Caption = Tmp1
End Sub
Sub TestSpellMoney ()
   Dim title      As String
   Dim Tmp        As String
   Dim Tmp1       As String
   Dim Tmp2       As String
   Dim i          As Integer
   Dim j          As Integer
   Dim Units      As String
   Dim Cents      As String
   Units = "dollars"
   Cents = "cents"
   Tmp1 = "Spelling the following money value " & Chr$(13) & Chr$(13)
   Tmp1 = Tmp1 & "4.12 is '" & cSpellMoney(4.12, Units, Cents) & "'" & Chr$(13) & Chr$(13)
   Tmp1 = Tmp1 & "16 is '" & cSpellMoney(16, Units, Cents) & "'" & Chr$(13) & Chr$(13)
   Tmp1 = Tmp1 & "25 is '" & cSpellMoney(25, Units, Cents) & "'" & Chr$(13) & Chr$(13)
   Tmp1 = Tmp1 & "34 is '" & cSpellMoney(34, Units, Cents) & "'" & Chr$(13) & Chr$(13)
   Tmp1 = Tmp1 & "43 is '" & cSpellMoney(43, Units, Cents) & "'" & Chr$(13) & Chr$(13)
   Tmp1 = Tmp1 & "61 is '" & cSpellMoney(61, Units, Cents) & "'" & Chr$(13) & Chr$(13)
   Tmp1 = Tmp1 & "98765.43 is '" & cSpellMoney(98765.43, Units, Cents) & "'" & Chr$(13) & Chr$(13)
   Tmp1 = Tmp1 & "123456789.75 is '" & cSpellMoney(123456789.75, Units, Cents) & "'" & Chr$(13) & Chr$(13)
   cStartBasisTimer
   For i = 1 To Item
      Tmp2 = cSpellMoney(12.34, Units, Cents)
   Next i
   Tmp1 = Tmp1 & "speed for " & Item & " = " & cReadBasisTimer() & " ms"
   Label3.Caption = Tmp1
End Sub
Sub TestSplitPath ()
   Dim title      As String
   Dim Tmp        As String
   Dim Tmp1       As String
   Dim Tmp2       As String
   Dim Tmp3       As String
   Dim i          As Integer
   Dim n          As Integer
   Dim j          As Long
   Dim SPLITPATH  As tagSPLITPATH
   Tmp1 = ""
   Tmp = "C:\AUTOEXEC.BAT"
   Tmp1 = Tmp1 & "Split Path " & Tmp & " into four components is :" & Chr$(13) & Chr$(13)
   n = cSplitPath(Tmp, SPLITPATH)
   Tmp1 = Tmp1 & Space$(3) & SPLITPATH.nDrive & Chr$(13)
   Tmp1 = Tmp1 & Space$(3) & SPLITPATH.nDir & Chr$(13)
   Tmp1 = Tmp1 & Space$(3) & SPLITPATH.nName & Chr$(13)
   Tmp1 = Tmp1 & Space$(3) & SPLITPATH.nExt & Chr$(13) & Chr$(13)
   Tmp = cGetSystemDirectory() & "\TIME2WIN.DLL"
   Tmp1 = Tmp1 & "Split Path " & Tmp & " into four components is :" & Chr$(13) & Chr$(13)
   n = cSplitPath(Tmp, SPLITPATH)
   Tmp1 = Tmp1 & Space$(3) & SPLITPATH.nDrive & Chr$(13)
   Tmp1 = Tmp1 & Space$(3) & SPLITPATH.nDir & Chr$(13)
   Tmp1 = Tmp1 & Space$(3) & SPLITPATH.nName & Chr$(13)
   Tmp1 = Tmp1 & Space$(3) & SPLITPATH.nExt & Chr$(13) & Chr$(13)
   cStartBasisTimer
   For i = 1 To Item
      n = cSplitPath(Tmp, SPLITPATH)
   Next i
   Tmp1 = Tmp1 & "speed for " & Item & " = " & cReadBasisTimer() & " ms" & Chr$(13) & Chr$(13)
   Label3.Caption = Tmp1
End Sub
Sub TestStringCompress ()
   Dim title      As String
   Dim Tmp        As String
   Dim Tmp1       As String
   Dim Tmp2       As String
   Dim Tmp3       As String
   Dim i          As Integer
   Dim j          As Long
   Tmp1 = ""
   Tmp = "TIME TO WIN, TIME TO WIN, TIME TO WIN, TIME TO WIN"
   Tmp2 = cStringCompress(Tmp)
   Tmp3 = cStringExpand(Tmp2)
   Tmp1 = Tmp1 & "String Compress '" & Tmp & "' is " & Format$(Len(Tmp)) & " to " & Format$(Len(Tmp2)) & " bytes." & Chr$(13)
   Tmp1 = Tmp1 & "String Expand is '" & Tmp3 & "'" & Chr$(13)
   Tmp1 = Tmp1 & "Compare string contents (not sensitive) is " & IIf(LCase$(Tmp) = LCase$(Tmp3), "same", "not same") & Chr$(13) & Chr$(13)
   cStartBasisTimer
   For i = 1 To Item
      Tmp2 = cStringCompress(Tmp)
   Next i
   Tmp3 = cStringExpand(Tmp2)
   Tmp1 = Tmp1 & "speed for " & Item & " = " & cReadBasisTimer() & " ms" & Chr$(13) & Chr$(13)
   Label3.Caption = Tmp1
End Sub
Sub TestStringCRC32 ()
   Dim title      As String
   Dim Tmp        As String
   Dim Tmp1       As String
   Dim Tmp2       As String
   Dim i          As Integer
   Dim j          As Integer
   Dim k          As Long
   Tmp = Text1.Text
   title = "CRC32 for string [" & Tmp & "] is "
   Tmp1 = title & Hex$(cStringCRC32(Tmp)) & Chr$(13) & Chr$(13)
   title = "CRC32 for string [" & cReverse(Tmp) & "] is "
   Tmp1 = Tmp1 & title & Hex$(cStringCRC32(cReverse(Tmp))) & Chr$(13) & Chr$(13)
   title = "CRC32 for string [" & LCase$(Tmp) & "] is "
   Tmp1 = Tmp1 & title & Hex$(cStringCRC32(LCase$(Tmp))) & Chr$(13) & Chr$(13)
   title = "CRC32 for string [" & LCase$(cReverse(Tmp)) & "] is "
   Tmp1 = Tmp1 & title & Hex$(cStringCRC32(LCase$(cReverse(Tmp)))) & Chr$(13) & Chr$(13)
   cStartBasisTimer
   For i = 1 To Item
      k = cStringCRC32(Tmp)
   Next i
   Tmp1 = Tmp1 & "speed for " & Item & " = " & cReadBasisTimer() & " ms"
   Label3.Caption = Tmp1
End Sub
Sub TestStringSAR ()
   Dim title      As String
   Dim Tmp        As String
   Dim Tmp1       As String
   Dim Tmp2       As String
   Dim Tmp3       As String
   Dim i          As Integer
   Dim j          As Long
   Tmp1 = ""
   Tmp = "TIME TO WIN, TIME TO WIN, TIME TO WIN, TIME TO WIN IS A DLL"
   Tmp2 = cStringSAR(Tmp, "TIME TO WIN", "time2win", False)
   Tmp1 = Tmp1 & "Replace 'TIME TO WIN' by 'time2win'" & Chr$(13)
   Tmp1 = Tmp1 & "     in" & Chr$(13)
   Tmp1 = Tmp1 & Tmp & Chr$(13)
   Tmp1 = Tmp1 & "     is" & Chr$(13)
   Tmp1 = Tmp1 & Tmp2 & Chr$(13) & Chr$(13)
   Tmp2 = cStringSAR(Tmp, " TO ", "2", True)
   Tmp1 = Tmp1 & "Replace ' TO ' by '2'" & Chr$(13)
   Tmp1 = Tmp1 & "     in" & Chr$(13)
   Tmp1 = Tmp1 & Tmp & Chr$(13)
   Tmp1 = Tmp1 & "     is" & Chr$(13)
   Tmp1 = Tmp1 & Tmp2 & Chr$(13) & Chr$(13)
   Tmp2 = cStringSAR(Tmp, "TIME TO WIN, ", "", True)
   Tmp1 = Tmp1 & "Replace 'TIME TO WIN, ' by ''" & Chr$(13)
   Tmp1 = Tmp1 & "     in" & Chr$(13)
   Tmp1 = Tmp1 & Tmp & Chr$(13)
   Tmp1 = Tmp1 & "     is" & Chr$(13)
   Tmp1 = Tmp1 & Tmp2 & Chr$(13) & Chr$(13)
   Tmp2 = cStringSAR(Tmp, "I", "i", False)
   Tmp1 = Tmp1 & "Replace 'I' by 'i'" & Chr$(13)
   Tmp1 = Tmp1 & "     in" & Chr$(13)
   Tmp1 = Tmp1 & Tmp & Chr$(13)
   Tmp1 = Tmp1 & "     is" & Chr$(13)
   Tmp1 = Tmp1 & Tmp2 & Chr$(13) & Chr$(13)
   cStartBasisTimer
   For i = 1 To Item
      Tmp2 = cStringSAR(Tmp, "TIME TO WIN", "time2win", False)
   Next i
   Tmp1 = Tmp1 & "speed for " & Item & " = " & cReadBasisTimer() & " ms" & Chr$(13) & Chr$(13)
   Label3.Caption = Tmp1
End Sub
Sub TestSubDirectory ()
   Dim title      As String
   Dim Tmp        As String
   Dim Tmp1       As String
   Dim Tmp2       As String
   Dim i          As Integer
   Dim j          As Integer
   Dim k          As Long
   title = "The 7 first directories in this directory are" & Chr$(13) & Chr$(13)
   Tmp1 = title
   Tmp2 = cSubDirectory("*.*", True)
   For i = 1 To 7
      Tmp1 = Tmp1 & Tmp2 & Chr$(13)
      Tmp2 = cSubDirectory("*.*", False)
   Next i
   Tmp1 = Tmp1 & Chr$(13)
   cStartBasisTimer
   For i = 1 To Item
      Tmp = cSubDirectory("*.*", True)
   Next i
   Tmp1 = Tmp1 & "speed for " & Item & " = " & cReadBasisTimer() & " ms"
   Label3.Caption = Tmp1
End Sub
Sub TestSumI ()
   Dim title      As String
   Dim Tmp        As String
   Dim Tmp1       As String
   Dim Tmp2       As String
   Dim i          As Integer
   Dim j          As Integer
   Dim m          As Double
   ReDim array(ItemMean) As Integer
   Randomize Timer
   m = 0
   For i = LBound(array) To UBound(array)
      array(i) = Int(RandI * Rnd(1))
      m = m + array(i)
      List1.AddItem "" & array(i)
   Next i
   Tmp1 = "The Sum of a integer array of " & (ItemMean + 1) & " elements is " & Chr$(13) & Chr$(13) & cSumI(array()) & " (" & m & ")" & Chr$(13) & Chr$(13)
   cStartBasisTimer
   For i = 1 To ItemFile
      m = cSumI(array())
   Next i
   Tmp1 = Tmp1 & "speed for " & ItemFile & " = " & cReadBasisTimer() & " ms"
   Label3.Caption = Tmp1
End Sub
Sub TestSwap ()
   Dim title      As String
   Dim Tmp        As String
   Dim Tmp1       As String
   Dim Tmp2       As String
   Dim i          As Integer
   Dim j          As Long
   Dim i1         As Integer
   Dim i2         As Integer
   Dim s1         As String
   Dim s2         As String
   i1 = 3276
   i2 = 12345
   s1 = "Hello"
   s2 = "World"
   Tmp1 = "SwapI of [" & i1 & "," & i2 & "] is "
   Call cSwapI(i1, i2)
   Tmp1 = Tmp1 + "[" & i1 & "," & i2 & "]" & Chr$(13)
   Tmp1 = Tmp1 + "SwapI of [" & i1 & "," & i2 & "] is "
   Call cSwapI(i1, i2)
   Tmp1 = Tmp1 + "[" & i1 & "," & i2 & "]" & Chr$(13)
   Tmp1 = Tmp1 + "SwapStr of [" & s1 & "," & s2 & "] is "
   Call cSwapStr(s1, s2)
   Tmp1 = Tmp1 + "[" & s1 & "," & s2 & "]" & Chr$(13)
   Tmp1 = Tmp1 + "SwapStr of [" & s1 & "," & s2 & "] is "
   Call cSwapStr(s1, s2)
   Tmp1 = Tmp1 + "[" & s1 & "," & s2 & "]" & Chr$(13)
   cStartBasisTimer
   For i = 1 To Item
      Call cSwapI(i1, i2)
   Next i
   Tmp1 = Tmp1 & "speed for " & Item & " = " & cReadBasisTimer() & " ms"
   Label3.Caption = Tmp1
End Sub
Sub TestSysMenuChange (Language As Integer)
   Call cLngSysMenu(Language, Me.hWnd)
End Sub
Sub TestTime ()
   Dim Tmp1       As String
   Dim i          As Integer
   Dim nNow       As Long
   Dim nHour      As Integer
   Dim nMinute    As Integer
   Dim nSecond    As Integer
   nHour = Hour(Now)
   nMinute = Minute(Now)
   nSecond = Second(Now)
   nNow = cTimeToScalar(nHour, nMinute, nSecond)
   Tmp1 = Tmp1 & "Now scalar time is '" & nNow & "'" & Chr$(13)
   nHour = 0
   nMinute = 0
   nSecond = 0
   Call cScalarToTime(nNow, nHour, nMinute, nSecond)
   Tmp1 = Tmp1 & "Hour : " & nHour & ", Minute : " & nMinute & ", Second : " & nSecond & Chr$(13) & Chr$(13)
   nNow = cTimeToScalar(32767, 59, 59)
   Tmp1 = Tmp1 & "Maximum scalar time is '" & nNow & "'" & Chr$(13)
   nHour = 0
   nMinute = 0
   nSecond = 0
   Call cScalarToTime(nNow, nHour, nMinute, nSecond)
   Tmp1 = Tmp1 & "Hour : " & nHour & ", Minute : " & nMinute & ", Second : " & nSecond & Chr$(13) & Chr$(13)
   cStartBasisTimer
   For i = 1 To Item
      nNow = cTimeToScalar(nHour, nMinute, nSecond)
   Next i
   Tmp1 = Tmp1 & "speed for " & Item & " = " & cReadBasisTimer() & " ms"
   Label3.Caption = Tmp1
End Sub
Sub TestTimeBetween ()
   Dim title      As String
   Dim Tmp        As String
   Dim Tmp1       As String
   Dim Tmp2       As String
   Dim i          As Integer
   Dim j          As Integer
   Tmp1 = "The time between 10:00 and 12:01 is " & cTimeBetween(600, 721) & " minutes" & Chr$(13) & Chr$(13)
   Tmp1 = Tmp1 & "The time between 23:58 and 01:02 is " & cTimeBetween(1438, 62) & " minutes" & Chr$(13) & Chr$(13)
   cStartBasisTimer
   For i = 1 To Item
      j = cTimeBetween(0, 1439)
   Next i
   Tmp1 = Tmp1 & "speed for " & Item & " = " & cReadBasisTimer() & " ms"
   Label3.Caption = Tmp1
End Sub
Sub TestTimer ()
   Dim Tmp1          As String
   Dim Tmp           As String
   Dim Tmp2          As String
   Dim i             As Integer
   Dim j             As Integer
   Dim k             As Long
   Dim TimerHandle   As Integer
   Dim StartOk       As Integer
   Dim CloseOk       As Integer
   Tmp1 = "BASIS TIMER" & Chr$(13) & Chr$(13)
   Tmp1 = Tmp1 & "The elapsed time for a empty loop of 32766 iterations is "
   cStartBasisTimer
   For i = 1 To 32766
   Next i
   Tmp1 = Tmp1 & cReadBasisTimer() & " ms" & Chr$(13) & Chr$(13)
   Tmp1 = Tmp1 & "The elapsed time for a integer loop of 32766 iterations is "
   j = 0
   cStartBasisTimer
   For i = 1 To 32766
      j = j + 1
   Next i
   Tmp1 = Tmp1 & cReadBasisTimer() & " ms" & Chr$(13) & Chr$(13)
   Tmp1 = Tmp1 & "The elapsed time for a long loop of 32766 iterations is "
   k = 0
   cStartBasisTimer
   For i = 1 To 32766
      k = i * 2&
   Next i
   Tmp1 = Tmp1 & cReadBasisTimer() & " ms" & Chr$(13) & Chr$(13)
   Tmp1 = Tmp1 & "The elapsed time for a string loop of 1000 iterations is "
   cStartBasisTimer
   For i = 1 To 1000
      Tmp2 = Tmp2 + "a"
   Next i
   Tmp1 = Tmp1 & cReadBasisTimer() & " ms" & Chr$(13) & Chr$(13)
   Call cStartBasisTimer
   StartOk = cSleep(1000)
   Tmp1 = Tmp1 & "True time for 1 wait second is " & cReadBasisTimer() & " ms" & Chr$(13) & Chr$(13)
   TimerHandle = cTimerOpen()
   Tmp1 = Tmp1 & "EXTENDED TIMER (handle is '" & TimerHandle & "')" & Chr$(13) & Chr$(13)
   Tmp1 = Tmp1 & "The elapsed time for a empty loop of 32766 iterations is "
   StartOk = cTimerStart(TimerHandle)
   For i = 1 To 32766
   Next i
   Tmp1 = Tmp1 & cTimerRead(TimerHandle) & " ms" & Chr$(13) & Chr$(13)
   Tmp1 = Tmp1 & "The elapsed time for a integer loop of 32766 iterations is "
   j = 0
   StartOk = cTimerStart(TimerHandle)
   For i = 1 To 32766
      j = j + 1
   Next i
   Tmp1 = Tmp1 & cTimerRead(TimerHandle) & " ms" & Chr$(13) & Chr$(13)
   Tmp1 = Tmp1 & "The elapsed time for a long loop of 32766 iterations is "
   k = 0
   StartOk = cTimerStart(TimerHandle)
   For i = 1 To 32766
      k = i * 2&
   Next i
   Tmp1 = Tmp1 & cTimerRead(TimerHandle) & " ms" & Chr$(13) & Chr$(13)
   Tmp1 = Tmp1 & "The elapsed time for a string loop of 1000 iterations is "
   StartOk = cTimerStart(TimerHandle)
   For i = 1 To 1000
      Tmp2 = Tmp2 + "a"
   Next i
   Tmp1 = Tmp1 & cTimerRead(TimerHandle) & " ms" & Chr$(13) & Chr$(13)
   StartOk = cTimerStart(TimerHandle)
   StartOk = cSleep(1000)
   Tmp1 = Tmp1 & "True time for 1 wait second is " & cTimerRead(TimerHandle) & " ms" & Chr$(13) & Chr$(13)
   Label3.Caption = Tmp1
   CloseOk = cTimerClose(TimerHandle)
End Sub
Sub TestToggleAllBits ()
   Dim title      As String
   Dim Tmp        As String
   Dim Tmp1       As String
   Dim Tmp2       As String
   Dim i          As Integer
   Dim j          As Integer
   Tmp = Text1.Text
   title = "Toggle all bits of [" & Tmp & "] is "
   Call cToggleAllBits(Tmp)
   Tmp1 = title & "[" & Tmp & "] " & Chr$(13) & Chr$(13)
   title = "Toggle all bits of [" & Tmp & "] is "
   Call cToggleAllBits(Tmp)
   Tmp1 = Tmp1 & title & "[" & Tmp & "] " & Chr$(13) & Chr$(13)
   cStartBasisTimer
   For i = 1 To Item
      Call cToggleAllBits(Tmp)
   Next i
   Tmp1 = Tmp1 & "speed for " & Item & " = " & cReadBasisTimer() & " ms"
   Label3.Caption = Tmp1
End Sub
Sub TestToggleBit ()
   Dim title      As String
   Dim Tmp        As String
   Dim Tmp1       As String
   Dim Tmp2       As String
   Dim i          As Integer
   Dim j          As Integer
   Tmp = Text1.Text
   title = "Toggle bit 7,22,15 of [" & Tmp & "] is "
   Call cToggleBit(Tmp, 7)
   Call cToggleBit(Tmp, 22)
   Call cToggleBit(Tmp, 15)
   Tmp1 = title & "[" & Tmp & "] " & Chr$(13) & Chr$(13)
   title = "Toggle bit 7,22,15 of [" & Tmp & "] is "
   Call cToggleBit(Tmp, 7)
   Call cToggleBit(Tmp, 22)
   Call cToggleBit(Tmp, 15)
   Tmp1 = Tmp1 & title & "[" & Tmp & "] " & Chr$(13) & Chr$(13)
   cStartBasisTimer
   For i = 1 To Item
      Call cToggleBit(Tmp, i)
   Next i
   Tmp1 = Tmp1 & "speed for " & Item & " = " & cReadBasisTimer() & " ms"
   Label3.Caption = Tmp1
End Sub
Sub TestToHexa ()
   Dim intResult        As Integer
   Dim strResult        As String
   Dim strDisplay       As String
   Dim i                As Integer
   Dim Str1             As String
   Dim Str2             As String
   intResult = 0
   strResult = ""
   strDisplay = ""
   Str1 = Text1.Text
   Str2 = cToHexa(Str1)
   strDisplay = strDisplay & "To Hexa of '" & Str1 & "' is" & Chr$(13) & Chr$(13)
   strDisplay = strDisplay & "'" & Str2 & "'" & Chr$(13) & Chr$(13)
   strDisplay = strDisplay & "From Hexa of '" & Str2 & "' is" & Chr$(13) & Chr$(13)
   strDisplay = strDisplay & "'" & cFromHexa(Str2) & "'" & Chr$(13) & Chr$(13)
   Str1 = "ABCDEFGH"
   Str2 = cToHexa(Str1)
   strDisplay = strDisplay & "To Hexa of '" & Str1 & "' is" & Chr$(13) & Chr$(13)
   strDisplay = strDisplay & "'" & Str2 & "'" & Chr$(13) & Chr$(13)
   strDisplay = strDisplay & "From Hexa of '" & Str2 & "' is" & Chr$(13) & Chr$(13)
   strDisplay = strDisplay & "'" & cFromHexa(Str2) & "'" & Chr$(13) & Chr$(13)
   Str1 = "01234567890"
   Str2 = cToHexa(Str1)
   strDisplay = strDisplay & "To Hexa of '" & Str1 & "' is" & Chr$(13) & Chr$(13)
   strDisplay = strDisplay & "'" & Str2 & "'" & Chr$(13) & Chr$(13)
   strDisplay = strDisplay & "From Hexa of '" & Str2 & "' is" & Chr$(13) & Chr$(13)
   strDisplay = strDisplay & "'" & cFromHexa(Str2) & "'" & Chr$(13) & Chr$(13)
   'time the function
   Str1 = Text1.Text
   cStartBasisTimer
   For i = 1 To Item
      strResult = cToHexa(Str1)
   Next i
   strDisplay = strDisplay & "speed for " & Item & " = " & cReadBasisTimer() & " ms"
   Label3.Caption = strDisplay
End Sub
Sub TestToken ()
   Dim title      As String
   Dim Tmp        As String
   Dim Tmp1       As String
   Dim Tmp2       As String
   Dim i          As Integer
   Dim j          As Integer
   Tmp = "A/BC\DEF=GHIJ?KLMNO:PQRSTUV"
   title = "The 2,4,1,5 blocks of [" & Tmp & "] separated by any one of '/\=?' are " & Chr$(13)
   Tmp1 = title & "  2:" & cTokenIn(Tmp, "/\=?", 2) & Chr$(13) & "  4:" & cTokenIn(Tmp, "/\=?", 4) & Chr$(13) & "  1:" & cTokenIn(Tmp, "/\=?", 1) & Chr$(13) & "  5:" & cTokenIn(Tmp, "/\=?", 5) & Chr$(13) & Chr$(13)
   cStartBasisTimer
   For i = 1 To Item
      Tmp2 = cTokenIn(Tmp, "/\=?", 2)
   Next i
   Tmp1 = Tmp1 & "speed for " & Item & " = " & cReadBasisTimer() & " ms"
   Label3.Caption = Tmp1
End Sub
Sub TestToZ9 ()
   Dim intResult        As Integer
   Dim strResult        As String
   Dim strDisplay       As String
   Dim i                As Integer
   Dim Str1             As String
   Dim Str2             As String
   intResult = 0
   strResult = ""
   strDisplay = ""
   Str1 = Text1.Text
   Str2 = cToZ9(Str1)
   strDisplay = strDisplay & "To Z9 of '" & Str1 & "' is" & Chr$(13) & Chr$(13)
   strDisplay = strDisplay & "'" & Str2 & "'" & Chr$(13) & Chr$(13)
   strDisplay = strDisplay & "From Z9 of '" & Str2 & "' is" & Chr$(13) & Chr$(13)
   strDisplay = strDisplay & "'" & cFromZ9(Str2) & "'" & Chr$(13) & Chr$(13)
   Str1 = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
   Str2 = cToZ9(Str1)
   strDisplay = strDisplay & "To Z9 of '" & Str1 & "' is" & Chr$(13) & Chr$(13)
   strDisplay = strDisplay & "'" & Str2 & "'" & Chr$(13) & Chr$(13)
   strDisplay = strDisplay & "From Z9 of '" & Str2 & "' is" & Chr$(13) & Chr$(13)
   strDisplay = strDisplay & "'" & cFromZ9(Str2) & "'" & Chr$(13) & Chr$(13)
   Str1 = "01234567890"
   Str2 = cToZ9(Str1)
   strDisplay = strDisplay & "To Z9 of '" & Str1 & "' is" & Chr$(13) & Chr$(13)
   strDisplay = strDisplay & "'" & Str2 & "'" & Chr$(13) & Chr$(13)
   strDisplay = strDisplay & "From Z9 of '" & Str2 & "' is" & Chr$(13) & Chr$(13)
   strDisplay = strDisplay & "'" & cFromZ9(Str2) & "'" & Chr$(13) & Chr$(13)
   'time the function
   Str1 = Text1.Text
   cStartBasisTimer
   For i = 1 To Item
      strResult = cToZ9(Str1)
   Next i
   strDisplay = strDisplay & "speed for " & Item & " = " & cReadBasisTimer() & " ms"
   Label3.Caption = strDisplay
End Sub
Sub TestTrueBetween ()
   Dim title      As String
   Dim Tmp        As String
   Dim Tmp1       As String
   Dim Tmp2       As String
   Dim i          As Integer
   Dim j          As Integer
   Tmp1 = "601 is not true between 720 and 840 => " & cTrueBetween(601, 720, 840) & Chr$(13) & Chr$(13)
   Tmp1 = Tmp1 & "601 is true between 540 and 602 => " & cTrueBetween(601, 540, 602) & Chr$(13) & Chr$(13)
   Tmp1 = Tmp1 & "61 is not true between 61 and 62 => " & cTrueBetween(61, 61, 62) & Chr$(13) & Chr$(13)
   cStartBasisTimer
   For i = 1 To Item
      j = cTrueBetween(720, 0, 1439)
   Next i
   Tmp1 = Tmp1 & "speed for " & Item & " = " & cReadBasisTimer() & " ms"
   Label3.Caption = Tmp1
End Sub
Sub TestTruncatePath ()
   Dim title      As String
   Dim Tmp        As String
   Dim Tmp1       As String
   Dim Tmp2       As String
   Dim Tmp3       As String
   Dim i          As Integer
   Dim j          As Long
   Tmp1 = ""
   Tmp1 = Tmp1 & "Truncate the following path with a length of 25" & Chr$(13) & Chr$(13)
   Tmp = "time2win.bas"
   Tmp2 = cTruncatePath(Tmp, 25)
   Tmp1 = Tmp1 & Tmp & Chr$(13) & " -> " & Tmp2 & "  (len=" & Len(Tmp2) & ")" & Chr$(13)
   Tmp = "windows\system\time2win.bas"
   Tmp2 = cTruncatePath(Tmp, 25)
   Tmp1 = Tmp1 & Tmp & Chr$(13) & " -> " & Tmp2 & "  (len=" & Len(Tmp2) & ")" & Chr$(13)
   Tmp = "c:\windows\system\time2win.bas"
   Tmp2 = cTruncatePath(Tmp, 25)
   Tmp1 = Tmp1 & Tmp & Chr$(13) & " -> " & Tmp2 & "  (len=" & Len(Tmp2) & ")" & Chr$(13)
   Tmp = "c:\windows\system\visual\time2win\time2win.bas"
   Tmp2 = cTruncatePath(Tmp, 25)
   Tmp1 = Tmp1 & Tmp & Chr$(13) & " -> " & Tmp2 & "  (len=" & Len(Tmp2) & ")" & Chr$(13)
   Tmp = "c:\windows\system\visual\source\time2win\time2win.bas"
   Tmp2 = cTruncatePath(Tmp, 25)
   Tmp1 = Tmp1 & Tmp & Chr$(13) & " -> " & Tmp2 & "  (len=" & Len(Tmp2) & ")" & Chr$(13) & Chr$(13)
   Tmp1 = Tmp1 & "Truncate the following path with a length of 35" & Chr$(13) & Chr$(13)
   Tmp = "time2win.bas"
   Tmp2 = cTruncatePath(Tmp, 35)
   Tmp1 = Tmp1 & Tmp & Chr$(13) & " -> " & Tmp2 & "  (len=" & Len(Tmp2) & ")" & Chr$(13)
   Tmp = "windows\system\time2win.bas"
   Tmp2 = cTruncatePath(Tmp, 35)
   Tmp1 = Tmp1 & Tmp & Chr$(13) & " -> " & Tmp2 & "  (len=" & Len(Tmp2) & ")" & Chr$(13)
   Tmp = "c:\windows\system\time2win.bas"
   Tmp2 = cTruncatePath(Tmp, 35)
   Tmp1 = Tmp1 & Tmp & Chr$(13) & " -> " & Tmp2 & "  (len=" & Len(Tmp2) & ")" & Chr$(13)
   Tmp = "c:\windows\system\visual\time2win\time2win.bas"
   Tmp2 = cTruncatePath(Tmp, 35)
   Tmp1 = Tmp1 & Tmp & Chr$(13) & " -> " & Tmp2 & "  (len=" & Len(Tmp2) & ")" & Chr$(13)
   Tmp = "c:\windows\system\visual\source\time2win\time2win.bas"
   Tmp2 = cTruncatePath(Tmp, 35)
   Tmp1 = Tmp1 & Tmp & Chr$(13) & " -> " & Tmp2 & "  (len=" & Len(Tmp2) & ")" & Chr$(13) & Chr$(13)
   cStartBasisTimer
   For i = 1 To Item
      Tmp2 = cTruncatePath(Tmp, 25)
   Next i
   Tmp1 = Tmp1 & "speed for " & Item & " = " & cReadBasisTimer() & " ms" & Chr$(13) & Chr$(13)
   Label3.Caption = Tmp1
End Sub
Sub TestUncompact ()
   Dim title      As String
   Dim Tmp        As String
   Dim Tmp1       As String
   Dim Tmp2       As String
   Dim i          As Integer
   Dim j          As Integer
   Tmp = "987654321"
   title = "Uncompact '" & Tmp & "' is "
   Tmp1 = title & cUncompact(Tmp) & Chr$(13) & Chr$(13)
   cStartBasisTimer
   For i = 1 To Item
      Tmp2 = cUncompact(Tmp)
   Next i
   Tmp1 = Tmp1 & "speed for " & Item & " = " & cReadBasisTimer() & " ms"
   Label3.Caption = Tmp1
End Sub
Sub TestUniqueFileName ()
   Dim title      As String
   Dim Tmp        As String
   Dim Tmp1       As String
   Dim Tmp2       As String
   Dim i          As Integer
   Dim j          As Integer
   Tmp1 = "Generate unique filename with template WN is " & cUniqueFileName("WN") & Chr$(13) & Chr$(13)
   cStartBasisTimer
   For i = 1 To Item
      Tmp2 = cUniqueFileName("WN")
   Next i
   Tmp1 = Tmp1 & "speed for " & Item & " = " & cReadBasisTimer() & " ms"
   Label3.Caption = Tmp1
End Sub
Sub TestVersion ()
   Dim Tmp        As String
   Dim Version    As Single
   Version = cGetVersion()
   Tmp = Tmp + "Version is " & Version
   Label3.Caption = Tmp
End Sub
Sub TestWalkThruWindow ()
   Dim nClass        As String
   Dim nCaption      As String
   Dim nOwnerClass   As String
   Dim nOwnerCaption As String
   Dim nOwnerHwnd    As Integer
   Dim nhWnd         As Integer
   Dim i             As Integer
   Frame1.Visible = True
   List1.Clear
   List2.Clear
   List1.FontBold = False
   List2.FontBold = False
   nhWnd = cWalkThruWindow(nClass, nCaption, nOwnerHwnd, nOwnerClass, nOwnerCaption, True)
   Do While (nhWnd <> 0)
      i = i + 1
      List1.AddItem "[" & Format$(i, "00") & "] " & Right$("0000" + Hex$(nhWnd), 4) & " " & nCaption & " (" & nClass & ")"
      List2.AddItem "[" & Format$(i, "00") & "] " & Right$("0000" + Hex$(nOwnerHwnd), 4) & " " & nOwnerCaption & " (" & nOwnerClass & ")"
      nhWnd = cWalkThruWindow(nClass, nCaption, nOwnerHwnd, nOwnerClass, nOwnerCaption, False)
   Loop
End Sub
Sub TestWindowsIni ()
   Dim Tmp        As String
   Tmp = Tmp + "DateSeparator is " + cGetDateSeparator() + Chr$(13)
   Tmp = Tmp + "TimeSeparator is " + cGetTimeSeparator() + Chr$(13)
   Tmp = Tmp + "ListSeparator is " + cGetListSeparator() + Chr$(13)
   Tmp = Tmp + "DateFormat    is " + cGetDateFormat() + Chr$(13)
   Tmp = Tmp + "HourFormat    is " + cGetHourFormat() + Chr$(13)
   Tmp = Tmp + "Currency      is " + cGetCurrency() + Chr$(13)
   Tmp = Tmp + "Language      is " + cGetLanguage() + Chr$(13)
   Tmp = Tmp + "Country       is " + cGetCountry() + Chr$(13)
   Tmp = Tmp + "CountryCode   is " + cGetCountryCode() + Chr$(13)
   Label3.Caption = Tmp
End Sub
Sub TestWinINI1 ()
   Label3.Caption = cGetDevices() & Chr$(13) & Chr$(13) & "Length = " & Len(cGetDevices())
End Sub
Sub TestWinINI2 ()
   Label3.Caption = cGetPrinterPorts() & Chr$(13) & Chr$(13) & "Length = " & Len(cGetPrinterPorts())
End Sub
Sub TestWinINI3 ()
   Label3.Caption = cGetWinSection("windows") & Chr$(13) & Chr$(13) & "Length = " & Len(cGetWinSection("windows"))
End Sub
