Results 1 to 4 of 4

Thread: How to search for all Drive and display as TreeView ?

  1. #1

    Thread Starter
    New Member
    Join Date
    Jan 2000
    Location
    Malaysia
    Posts
    9

    Post

    Hi,
    Is there any simple way to detect all available drive and display it in a Treeview control ?

    Is there any ocx or API call to do it ?

    Thanks for reading this.

    Hank
    ----
    A computer programmer, is the soul creators, for computers.

  2. #2
    PowerPoster
    Join Date
    Jul 1999
    Posts
    5,923

    Post

    I remember seeing the answer to your question in MSDN ages ago, under "Using the ListView control" or something like that. It gives an example of what you are trying to do, but it is incredibly complex, so I gave up and used a Browse All Folders dialog using API instead!

    If anyone does know of any APIs or OCX's, or even any code, I would gladly swap my Browse All Folders dialog for a ListView - looks so much better!

    Good luck!

    Good luck,

    ------------------
    - Chris
    [email protected]
    If it ain't broke - don't fix it

  3. #3
    Hyperactive Member
    Join Date
    Jan 1999
    Location
    Rotterdam, Netherlands
    Posts
    386

  4. #4
    Addicted Member
    Join Date
    May 1999
    Location
    Californ-I- A
    Posts
    207

    Post

    I don't remembet exactly how now, I'm not at my home computer, but by using a listview control containing icons for drive types and open and closed folders in conjunction with the getDriveType API I was able to make a treeview control act like the one in windows explorer, loading the contents of each subdir as is clicked.

    You may also want to put a my computer icon as the parent node to each folder. and a desktop icon too...

    the getdrivetype api can be researched at www.vbapi.com

    good luck

    ------------------
    Micah Carrick
    http://micah.carrick.com
    [email protected]
    ICQ: 53480225


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