DECLARE FUNCTION DiskSpaceFree LIB "STKIT432.DLL" ALIAS _
"DISKSPACEFREE" () AS LONG
DECLARE SUB command1_click
DIM Form AS QFORM
WITH Form
.CAPTION = "SPACE ON DRIVE"
.Width = 320
.Height = 240
.Center
END WITH
DIM label1 AS QLABEL
WITH Label1
.PARENT = form
.CAPTION = "Label1"
.Wordwrap = 1
.Left = 2
.Top = 20
.Transparent = 1
.width = 300
END WITH
DIM command1 AS QBUTTON
WITH command1
.PARENT = form
.CAPTION = "Press for free space on drive space on drive c"
.Left = 32
.Top = 93
.Width = 259
.onclick = command1_click
END WITH
Form.SHOWMODAL
SUB Command1_Click
DIM free_Space AS LONG
CHDRIVE "c:"
free_Space = DiskSpaceFree()
Label1.CAPTION = "The total free space on Drive C: = " _
& STR$(free_Space) & " bytes or "& STR$(free_space/1048576)& _
" méga bytes or " & STR$(free_space/1073741824)& " giga bytes."
END SUB
|