DECLARE FUNCTION GetDriveType LIB "kernel32" ALIAS "GetDriveTypeA" (nDrive AS STRING) AS LONG
TYPE QDriveComboBox EXTENDS QCOMBOBOX
SUB GetDrives
DIM ASC_A AS INTEGER
DIM ASC_Z AS INTEGER
DIM i AS INTEGER
DIM name AS STRING
ASC_A=65
ASC_Z=ASC_A+25
FOR i=ASC_A TO ASC_Z
IF GetDriveType(CHR$(i)&":\")<>1 THEN
name=CHR$(i)+":\"
QDriveComboBox.AddItems name
END IF
NEXT i
QDriveComboBox.ItemIndex=0
END SUB
SUB AddItems
END SUB
SUB DelItems
END SUB
SUB Clear
END SUB
CONSTRUCTOR
END CONSTRUCTOR
END TYPE
|