Results 1 to 3 of 3

Thread: [2.0] [Resolved] driveListBox - getting full path

  1. #1

    Thread Starter
    Addicted Member jordan23's Avatar
    Join Date
    Dec 2002
    Posts
    166

    [2.0] [Resolved] driveListBox - getting full path

    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.
    Last edited by jordan23; Sep 27th, 2007 at 09:05 AM. Reason: Resolved

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: [2.0] driveListBox - getting full path

    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.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  3. #3

    Thread Starter
    Addicted Member jordan23's Avatar
    Join Date
    Dec 2002
    Posts
    166

    Re: [2.0] driveListBox - getting full path

    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.

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