I am using the driveListBox and I need to get the entire path, not just the drive letter. For example, if the drive letter is z: but the actual path is \\server1\share1\myfolder\, how do I get the actual path? Thanks.
Printable View
I am using the driveListBox and I need to get the entire path, not just the drive letter. For example, if the drive letter is z: but the actual path is \\server1\share1\myfolder\, how do I get the actual path? Thanks.
The DriveListBox is an old VB6 control and you shouldn't use it. If you want a list of drives then use the DriveInfo.GetDrives method to get an array of DriveInfo objects. You can then bind that to a ListBox or ComboBox if you like, plus each DriveInfo gives you various drive properties.
Thanks. I appreciate the help. I was able to find the network drive by using the driveListBox1.Drive property if I end up keeping the control. Thanks again.