re: Get directory |
| Chirag Bhavsar replied to Sujit Patil at 10-May-08 05:21 |
| The Directory List Box
The directory list box displays the directory structure of the current drive on the user's system, beginning with the top-level directory. Initially, the name of the current directory appears highlighted and indented from directories above it in the hierarchy, back to the root. Subdirectories are indented beneath the current directory in the directory list box. As a user moves up or down the list, each of the items is highlighted in turn.
Identifying Individual Directories
Each directory in the box has an integer identifier associated with it that allows you to identify individual directories. This capability is not provided by the common dialog control. The directory specified by the Path property (Dir1.Path) always has the ListIndex value of – 1. The directory immediately above it has the ListIndex value of – 2, the one above that of – 3, and so on up to the root. The first subdirectory of Dir1.Path has the ListIndex 0. If there are multiple directories at the first subdirectory level, the next has the ListIndex value of 1, then 2, and so on, as shown in Figure 7.18.
Figure 7.18 A directory structure displayed in the directory list box
.gif)
Further details related to operations you can find on
http://msdn.microsoft.com/en-us/library/aa733618(VS.60).aspx |
|