Results 1 to 5 of 5

Thread: [RESOLVED] dirlistbox & filelistbox

  1. #1

    Thread Starter
    New Member
    Join Date
    Jan 2006
    Posts
    9

    Resolved [RESOLVED] dirlistbox & filelistbox

    I have a DirListBox and FileListBox. What shoul I write, to selecting folder in Dirlistbox, in filelistbox will appear files in folder that is selected in dirlistBox?

  2. #2
    Frenzied Member d3gerald's Avatar
    Join Date
    Jan 2006
    Posts
    1,348

    Re: dirlistbox & filelistbox

    change the path of the filelistbox upon its click event
    On error goto Trap

    Trap:
    in case of emergency, drop the case...

    ****************************************
    If this post has been resolved. Please mark it as "Resolved" by going through the "Thread Tools" above and clicking on the "Mark Thread Resolved " option.
    if a post is helpful to you, Please Rate it by clicking on the Rate link right below the avatar

  3. #3
    Shared Member
    Join Date
    May 2005
    Location
    Kashmir, India
    Posts
    2,277

    Re: dirlistbox & filelistbox

    VB Code:
    1. Private Sub Dir1_Change()
    2.     File1.Path = Dir1.Path
    3. End Sub
    Dir1 is trhe Directory list box and File1 is the File list box.
    Use [code] source code here[/code] tags when you post source code.

    My Articles

  4. #4
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: dirlistbox & filelistbox

    To synchronize Visual Basic's three directory controls use
    VB Code:
    1. Private Sub Form_Load()
    2. Drive1.Drive = "C:"
    3. End Sub
    4.  
    5. Private Sub Drive1_Change()
    6. Dir1.Path = Drive1.Drive
    7. End Sub
    8.  
    9. Private Sub Dir1_Change()
    10. File1.Path = Dir1.Path
    11. End Sub

  5. #5

    Thread Starter
    New Member
    Join Date
    Jan 2006
    Posts
    9

    Re: [RESOLVED] dirlistbox & filelistbox

    thanks

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