Results 1 to 5 of 5

Thread: browsing for directory [Resolved]

  1. #1

    Thread Starter
    Lively Member
    Join Date
    May 2005
    Posts
    104

    Resolved browsing for directory [Resolved]

    hi guys, i was just wondering if there is a control where i canbrowse for a directory in my hardrive? or do i need o do some coding for this? thanks in advance guys.
    Last edited by trex; May 30th, 2005 at 08:09 PM.

  2. #2
    Fanatic Member vbasicgirl's Avatar
    Join Date
    Jan 2004
    Location
    Manchester, UK
    Posts
    1,016

    Re: browsing for directory

    there is a browseforfolder api but you can also do this
    VB Code:
    1. 'Make a reference to Microsoft Shell Controls and Automation
    2. Dim sh As New Shell32.Shell
    3. Dim str1 As Shell32.Folder2
    4.  
    5. Set str1 = sh.BrowseForFolder(Me.hWnd, "Select a Folder", 0, ssfDRIVES)
    6.  
    7. If Not str1 Is Nothing Then
    8.  MsgBox str1.Self.Path
    9. End If

    casey.

  3. #3
    VB Addict Pradeep1210's Avatar
    Join Date
    Apr 2004
    Location
    Inside the CPU...
    Posts
    6,614

    Re: browsing for directory

    U can use a DriveListBox, a DirListBox & FileListBox in conjunction to browse the in a visual way using the mouse.

    EDIT: Uuh.. Sorry vbasicgirl, I did't see ur post
    Pradeep, Microsoft MVP (Visual Basic)
    Please appreciate posts that have helped you by clicking icon on the left of the post.
    "A problem well stated is a problem half solved." — Charles F. Kettering

    Read articles on My Blog101 LINQ SamplesJSON ValidatorXML Schema Validator"How Do I" videos on MSDNVB.NET and C# ComparisonGood Coding PracticesVBForums Reputation SaverString EnumSuper Simple Tetris Game


    (2010-2013)
    NB: I do not answer coding questions via PM. If you want my help, then make a post and PM me it's link. If I can help, trust me I will...

  4. #4
    Super Moderator manavo11's Avatar
    Join Date
    Nov 2002
    Location
    Around the corner from si_the_geek
    Posts
    7,171

    Re: browsing for directory

    Here is a module if you want to avoid the reference
    Attached Files Attached Files


    Has someone helped you? Then you can Rate their helpful post.

  5. #5

    Thread Starter
    Lively Member
    Join Date
    May 2005
    Posts
    104

    Re: browsing for directory

    hi guys. i went through all of your codes and it was really great especially yours manavo11. thank you so much guys. i really appreciate your help

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