CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    Feb 2000
    Location
    Florida
    Posts
    9

    DriveListBox problem

    I have a drive List Box That dumps into a dir list box when selected... When you change the drive you have to double click a sub directory of a previous drive in order for it to refresh. ANyone else have this problem and know how to fix it? I have tried the refresh command on a change event of the drive list.

    Juan Torres
    Blue Cross Blue Shield of Florida
    Configuration Management & Distribution Solutions
    "Procastinating may be a bad habit, but a good tool for learning many different outcomes in life."

  2. #2
    Join Date
    Jan 2000
    Location
    MO, USA
    Posts
    1,506

    Re: DriveListBox problem

    I've haven't seen that problem but here some code that i use to do that.

    'Dir1 is the directory list box.
    'Drive1 is the drive list box.
    'File1 is the drive list box.
    private Sub Dir1_Change()
    File1.Path = Dir1.Path
    End Sub

    private Sub Drive1_Change()
    Dir1.Path = Drive1.Drive
    End Sub





    Hope this helps,
    John

    John Pirkey
    MCSD
    www.ShallowWaterSystems.com
    John Pirkey
    MCSD (VB6)
    http://www.stlvbug.org

  3. #3
    Join Date
    Feb 2000
    Location
    Florida
    Posts
    9

    Re: DriveListBox problem

    Having a little problems but thanks. Ill post my code in the morning.




    Juan Torres
    Blue Cross Blue Shield of Florida
    Configuration Management & Distribution Solutions
    "Procastinating may be a bad habit, but a good tool for learning many different outcomes in life."

  4. #4
    Join Date
    Jan 2000
    Location
    MO, USA
    Posts
    1,506

    Re: DriveListBox problem

    oops, now you see the wonderous evil of cut and paste. hehehe
    File1 is obviously the FileListBox on the form. You should be able to just open a new form, place a drive, directory and file list box on the form, paste the above code and hit F5. that's all i did to make sure i didn't have any code typos.

    have a good night,
    John

    John Pirkey
    MCSD
    www.ShallowWaterSystems.com
    John Pirkey
    MCSD (VB6)
    http://www.stlvbug.org

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

Featured