home *** CD-ROM | disk | FTP | other *** search
- Attribute VB_Name = "MCDISKDEMO_BAS"
- Option Explicit
-
- Public Const RandI = 32767
- Public Const RandL = 2147483647
- Public Const RandS = 1E+10!
- Public Const RandD = 1E+16
-
- Public T2WDirInst As String
- Public T2WDirTest As String
- Public T2WFileTest As String
-
-
- Public Sub sub_Load_Combo(Cmb As Control, strFile As String)
-
- Dim intStatus As Integer
- Dim strTmp As String
-
- On Error GoTo ErrorLoadCombo
-
- Close #1
- Open strFile For Input Shared As #1
-
- While Not EOF(1)
- Line Input #1, strTmp
- Cmb.AddItem strTmp
- Wend
-
- Cmb.ListIndex = 0
-
- Exit Sub
-
- ErrorLoadCombo:
-
- MsgBox ("File '" & strFile & "' can't be loaded !")
- Resume Next
-
- End Sub
-
- Public Sub sub_Initialization()
-
- Dim intResult As Integer
- Dim lngResult As Long
-
- T2WDirTest = T2WDirInst + "directory for testing"
- T2WFileTest = "autoexec.bat"
-
- intResult = cMakeDir(T2WDirTest)
-
- lngResult = cFileCopy("c:\autoexec.bat", T2WDirTest + "\" + T2WFileTest)
-
- If (lngResult = True) Then
- MsgBox "Can't copy file [" & T2WFileTest & "] in directory [" & T2WDirTest & "]"
- End If
-
- intResult = cChDir(T2WDirTest)
-
- End Sub
-
- Public Sub sub_Check_Project()
-
- T2WDirInst = App.Path + "\"
-
- If (cFilePathExists(T2WDirInst + "MCDSK-32.VBP") = False) Then
- MsgBox "'MC-DISK (32-Bit)' demo not found" & vbCrLf & vbCrLf & "Place all demo files in the same directory"
- End If
-
- End Sub
-
- Public Sub sub_NextPrev(Cmb As Control, Index As Integer)
-
- Dim n As Integer
- Dim t As Integer
-
- n = Cmb.ListIndex
- t = Cmb.ListCount - 1
-
- If (Index = 0) Then
- n = n - 1
- If (n < 0) Then n = 0
- Else
- n = n + 1
- If (n > t) Then n = t
- End If
-
- Cmb.ListIndex = n
-
- End Sub
-