Results 1 to 2 of 2

Thread: How can I get a full space of a drive?

  1. #1

    Thread Starter
    Registered User
    Join Date
    Jan 2000
    Location
    Otanmäki, Finland
    Posts
    7

    Post

    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

  2. #2
    Fanatic Member
    Join Date
    Jan 1999
    Location
    UK
    Posts
    593

    Post

    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
    [email protected]



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width