Results 1 to 6 of 6

Thread: [RESOLVED] dirlistbox problem

Threaded View

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Feb 2007
    Location
    Malaysia
    Posts
    1,370

    Resolved [RESOLVED] dirlistbox problem

    I use dirlistbox, Filelistbox, Drivelistbox. I run my Visual Basic Project from C:\TEST1 and my data store In path location "c:\Test\Data" or " d: \Test\Data\".

    During the form load, dirlistbox show the the path "c:\Test\Data" , drivelistbox show c:\. When I change drivelistbox from C to D, the dirlistbox show d:\Test\Data\. It work fine to me.

    The problem come out, When I try change back to C drive using drivelistbox , the dirlistbox show the wrong part data location. I show me the part of my Visual Basic Project C:\TEST1. I want the dirlistbox show me the part of data location c:\Test\Data not the part of my visual basic project C:\TEST1

    Have any Idea?Below is the code

    When I try to change the drivelistbox, the dirlistbox
    Code:
    Private Sub Drive1_Change()
    Dir1.Path = Drive1.Drive
    End Sub
    
    Private Sub Form_Load()
    
    Dir1.Path = "c:\Test\Data"
    Drive1.Drive = "c:\"
    File1.Path = Dir1.Path
    File1.Pattern = "*.shp"
    End Sub
    
    Private Sub Dir1_Change()
    
    If Dir1.Path = "c:\" Then
       Dir1.Path = "c:\Test\Data\"
    ElseIf Dir1.Path = "d:\" Then
    Dir1.Path = "d:\Test\Data\"
    Else
     File1.Path = Dir1.Path
    End If
    Below is the part of my visual basic project not the part of data location
    Attached Images Attached Images  

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