-
August 22nd, 2001, 02:29 PM
#1
VB6 - Drive, Dir, File ListBox
I am developing a form for the user Interface and I want to give user an ability to browse file/dir/drive list box to choose the file as an input. I don't know how to synchronise all three controls to work together on the form. I have following three controls on my form.
1) DriveListBox
2) DirListBox and
3) FileListBox
If I get the code sample from somebody for this, I will really apreciate it.
Thanks,
Pshah
-
August 22nd, 2001, 02:37 PM
#2
Re: VB6 - Drive, Dir, File ListBox
You could do that with something like this...
private Sub Dir1_Change()
File1.Path = Dir1.Path
End Sub
private Sub Drive1_Change()
Dir1.Path = Drive1.Drive
End Sub
But have you thought about using the CommonDialog control? All you would have to do is load the control into the project, apply the control to the form and use this code..
CommonDialog1.ShowOpen
MyFile = CommonDialog1.Filename
-
August 22nd, 2001, 04:46 PM
#3
Re: VB6 - Drive, Dir, File ListBox
Hi,
Put the three controls on a form:
This will help a little in what you are doing
Private Sub Drive1_Change()
Dir1.Path = Drive1.Drive
End Sub
Private Sub Dir1_Change()
File1.Path = Dir1.Path
End Sub
Private Sub File1_Click()
End Sub
check it out
Thanks
Hisham
Thank You, Hisham
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|