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

QDrive Component

QDrive is a component no visible of infos drivers.

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 "Object\QDrive.inc"

  dim drive as QDrive
  declare sub show

  CREATE Form AS QFORM
    Caption = "Proprietés disque dur"
    Width = 320
    Height = 240
    Center
    OnShow=show
    CREATE Label1 AS QLABEL
      Caption = ""
      Left = 22
      Top = 22
    END CREATE
  END CREATE
 

  Form.ShowModal

  sub show
    dim i as integer
    dim number as integer

    For i=1 to drive.Count
      if drive.GetType(i)=DRIVE_FIXED then number=i
    next i
    label1.caption="Nom lecteur: "+drive.name(number)+chr$(13)+ _
                           "Capacité: "+str$(drive.GetSize(number))+" octets"+chr$(13)+ _
                           "Espace libre: "+str$(drive.GetFreeSpace(number))+" octets"
  end sub
 
 
 

Hosted by uCoz