home *** CD-ROM | disk | FTP | other *** search
- Attribute VB_Name = "MCSTRINGDEMO_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_Check_Project()
-
- On Error GoTo ErrorCheckProject
-
- T2WDirInst = App.Path + "\"
-
- Close #1
- Open T2WDirInst + "MCSTR-32.VBP" For Input Shared As #1
- Close #1
-
- Exit Sub
-
- ErrorCheckProject:
-
- MsgBox "'MC-STRING (32-Bit)' demo not found" & vbCrLf & vbCrLf & "Place all demo files in the same directory"
- Resume Next
-
- 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
-