Caption = "With the mouse: Click on the top or bottom box line to scroll as well."
DragMode = 0
Enabled = -1
ForeColor = QBColor(15)
Height = Char(1)
Left = Char(1)
MousePointer = 0
TabIndex = 0
Tag = ""
Top = Char(1)
Visible = -1
Width = Char(70)
END
BEGIN CommandButton cmdALl
BackColor = QBColor(7)
Cancel = -1
Caption = "A&ll"
Default = 0
DragMode = 0
Enabled = -1
Height = Char(3)
Left = Char(60)
MousePointer = 0
TabIndex = 20
TabStop = -1
Tag = ""
Top = Char(15)
Visible = -1
Width = Char(10)
END
BEGIN CommandButton cmdCancel
BackColor = QBColor(7)
Cancel = 0
Caption = "&Cancel"
Default = 0
DragMode = 0
Enabled = -1
Height = Char(3)
Left = Char(60)
MousePointer = 0
TabIndex = 19
TabStop = -1
Tag = ""
Top = Char(18)
Visible = -1
Width = Char(10)
END
BEGIN Custom CzFile
Action = 0
Alignment = 0
Archive = 0
AutoRedraw = 0
BackColor = QBColor(7)
BorderStyle = 1
Caption = ""
Checked = 0
Column = 0
DragMode = 0
Drive = ""
Enabled = -1
Filename = ""
ForeColor = QBColor(0)
Height = Char(7)
Hidden = 0
Interval = 0
LargeChange = 0
Left = Char(2)
ListCount = 0
ListIndex = 0
Max = 0
Min = 0
Mode = 0
MousePointer = 0
MultiLine = 0
Normal = 0
Path = ""
Pattern = ""
ReadOnly = -1
Row = 0
ScrollBars = 0
SelLength = 0
SelStart = 0
SelText = ""
SmallChange = 0
Sorted = 0
Style = 0
System = 0
TabIndex = 1
TabStop = -1
Tag = ""
Text = ""
Top = Char(2)
TypeID = "CzFile"
Value = 0
Visible = -1
Width = Char(53)
END
END
DEFINT A-Z
'$FORM frmGeneral
'$FORM frmDemoAll
'$FORM frmOrder
' CzList Internal functions. These functions have to be declared if you
' want to use them.
DECLARE FUNCTION CzGetWhatKindMem% ()
DECLARE FUNCTION CzItemsTagged% ()
DECLARE FUNCTION CzAllowTagging% (YesNo%)
DECLARE FUNCTION CzKeybTagScrolling% (YesNo%)
DECLARE FUNCTION CzMouTagScrolling% (YesNo%)
DECLARE FUNCTION CzSetVirtualPath% (PathToSet$)
' Demo functions
DECLARE SUB AboutCzFile ()
SUB AboutCzFile ()
a$ = "CzFile is a file listbox control for VBDOS. It displays file name, size, date, time, and attributes. It fully supports tagging and untagging."
a$ = a$ + CHR$(13) + CHR$(10)
a$ = a$ + CHR$(13) + CHR$(10) + "You can tell CzFile to alphabetically sort the files or not. Sorting the files will increase the time to read all files into the listbox."
a$ = a$ + CHR$(13) + CHR$(10)
a$ = a$ + CHR$(13) + CHR$(10) + "CzFile will first try to use XMS Memory. If no XMS memory is available, it will try to use EMS Memory. If no XMS and no EMS memory is available, CzFile will use the disk as virtual memory."
MSGBOX a$, 0, "CzFile Demo"
END SUB
SUB chkAllowTag_Click ()
IF chkAllowTag.Value = 1 THEN
Result = CzAllowTagging(0)
Result = CzKeybTagScrolling(0)
Result = CzMouTagScrolling(0)
chkKeybTag.Enabled = -1
chkMouseTag.Enabled = -1
chkKeybTag.Value = 1
chkMouseTag.Value = 1
ELSE
Result = CzAllowTagging(1)
Result = CzKeybTagScrolling(1)
Result = CzMouTagScrolling(1)
chkKeybTag.Enabled = 0
chkMouseTag.Enabled = 0
END IF
END SUB
SUB chkKeybTag_Click ()
IF chkKeybTag.Value = 1 THEN
Result = CzKeybTagScrolling(0)
ELSE
Result = CzKeybTagScrolling(1)
END IF
END SUB
SUB chkMouseTag_Click ()
IF chkMouseTag.Value = 1 THEN
Result = CzMouTagScrolling(0)
ELSE
Result = CzMouTagScrolling(1)
END IF
END SUB
SUB cmdALl_Click ()
' You must UNLOAD the form or control(s) before you end your program. CzFile
' will then remove itself from memory. If you do not unload the form or
' control, the memory used by CzFile (either XMS, EMS, or disk space) will
' not be released and unpredictable results may occur.
UNLOAD frmDemoFile
frmDemoAll.SHOW 1
END SUB
SUB cmdCancel_Click ()
' You must UNLOAD the form or control(s) before you end your program. CzFile
' will then remove itself from memory. If you do not unload the form or
' control, the memory used by CzFile (either XMS, EMS, or disk space) will
' not be released and unpredictable results may occur.
UNLOAD frmDemoFile
frmOrder.SHOW 1
END
END SUB
SUB cmdTag_Click ()
' Tag all elements
' Value = 1 : tag alll elements in CzFile
' Value = 2 : untag alll elements in CzFile
CzFile.Value = 1
' Display the number of items tagged.
lblItemsTagged.Caption = STR$(CzItemsTagged)
CzFile.SETFOCUS
END SUB
SUB cmdUntag_Click ()
' Untag all elements
' Value = 1 : tag alll elements in CzFile
' Value = 2 : untag alll elements in CzFile
CzFile.Value = 2
' Display the number of items tagged.
lblItemsTagged.Caption = STR$(CzItemsTagged)
CzFile.SETFOCUS
END SUB
SUB CzFile_DblClick ()
' Get the current element and display it.
' CzFile.ListIndex is the current Index. You can also get any other
' index from 0 to ListCount. For example, to get element 189, use
' Dummy$ = CzFile.List(188). Remember, the list starts with element 0.