Documentation component by D.Glodt (c)2000-2001 Appendix A: QDrive

QDrive Component

QDrive is a non-visible component for drive info.
QDrive Properties
Field Type R/W Default
Name ARRAY OF STRING R
Name of  présent drivers
Count INTEGER R
Number of présent drivers

QDrive Methods
Method Type Description Params
GetType FUNCTION(index&) as long return the type of driver. 1
Possible values:DRIVE_REMOVABLE (2)
                          DRIVE_FIXED(3)
                          DRIVE_REMOTE(4)
                          DRIVE_CDROM(5)
                          DRIVE_RAMDISK(6)
GetFreeSpace FUNCTION(index&) as long return free space in octet of driver 1
GetSize FUNCTION(index&) as long return the size in octet from driver 1

QDrive Events
Event Type Occurs when... Params




QDrive Examples

 $INCLUDE "QDrive.inc"
dim drive as QDrive
'
$ESCAPECHARS ON
$TYPECHECK ON
$INCLUDE "RAPIDQ.INC"
'
Create frmMyForm As QForm
    Center
    Width = 600
    Create rchWin AS QRichEdit
        Align = alClient
    End Create
End Create
'
' *************************************
frmMyForm.Show
' *************************************
'
DefInt i
'
' Drive Type : DRIVE_REMOVABLE = 2, DRIVE_FIXED = 3, DRIVE_REMOTE = 4, DRIVE_CDROM = 5, DRIVE_RAMDISK = 6
'
For i = 1 To drive.Count
    If drive.GetType(i)= DRIVE_REMOVABLE then
       rchWin.AddString ("Drive Name     : " + drive.name(i) _
                     & "\n       Capacity: " + str$(drive.GetSize(i)) + " byte" _
                     & "\n     Free Space: " + str$(drive.GetFreeSpace(i)) + " byte\n")
    End If
Next i
rchWin.Addstring ("\n     *****   FINISHED   *****")
'
' *************************************
frmMyForm.Visible = False
frmMyForm.ShowModal
' *************************************