
VB : tree view and drive list box controls
First, if you're going to do this "correctly", get rid of the DriveListBox
control. The TreeView should also list the drives, as Explorer does. It
sounds like you're combining the Win3.x way of doing things with the
Win9x/NT/2000 way of doing things. That's a sure disaster because you're
only going to confuse users, who expect certain standards.
As for how to go about populating the TreeView with the directory structure,
there are a number of ways. If you're familiar with using the API, I'd
recommend the FindFirstFile and FindNextFile API functions (and of course
FindClose), but you can do it using VB's Dir function and still achieve
reasonable performance. I'd suggest going to Randy Birch's web site at
http://www.*-*-*.com/ ;I'm reasonably sure he has example code for
this.
Mike
Quote:
> i have a drive list control ( drvList ) and tree view
> control ( tvwFiles ).
> How can i make tvwFiles display the contents ( structure )
> of the selected drive ( drvList ) ?
> Thanks in advance,
> Regards,
> {*filter*}tech