Click to See Complete Forum and Search --> : How can I get a full space of a drive?
Merry VIP
Jan 6th, 2000, 04:51 PM
I know how to get free space by one dll, but how can I get total space? I haven't found any program/code about this.
And how can I create Win 9x like piechart without any dlls and ocxs and other?
I have VB4.
Vesa Piittinen
John
Jan 6th, 2000, 08:10 PM
Have a look at:
http://www.vb-world.net/demos/freespace/
In the frmMain file, there is a function that display the amount of free space on the drive. It works out the number of free bytes with this line:
FreeBytes = NumberOFreeClusters * SectorsPerCluster * BytesPerSector
You could also add this line because the API call returns the total number of clusters on the hard disk:
TotalBytes = TotalNumberOfClusters * SectorsPerCluster * BytesPerSector
To draw pie charts, you could start by having a look at the Circle method. It allows you to draw bits of circles as well as whole circles.
------------------
John Percival
Editor, VB-World.net
john@vb-world.net
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.