Listbox help

  • Thread starter Thread starter Mike
  • Start date Start date
M

Mike

Hello all, I'm a vb nubee and I need a little help. I'm trying to set up a
listbox that allows you to select the disk then the directory which will
allow you to present the files in that directory for selection. I'm kind of
stuck and need a little help. Any code snips would also be appreciated.

Thanks in advance.
 
Hi Mike,
Are you sure you want to to use a 'ListBox'? Why don't you look at the
'OpenFileDialog'?
 
Terry, thanks for the reply. Does the openfiledialog allow you to put two
boxes on the same form where you can select multiple files from one box?
I.E. using the control key or just highlighting each file and the second box
is the target drive and directory? What I was trying to do is set up two
listboxes side by side. One is the source box where you can drill down
starting at the drive letter which could be disk, network or cd. Then select
the files you wanted to copy by highlighting each file for the copy
operation. The second box would be the target, you would drill down to the
directory you wanted to place the files in. Then you would have a single
button to press that would start the copy operation.
 
Yes, The 'FileNames' property returns a list of the files selected. If you
wish to build your own dialog, try Help and 'indexing' to 'DirListBox'. You
can use this along with the 'DriveListBox' and 'FileListBox' to build a
dialog. Note that these are VB6 controls available through
'Microsoft.VisualBasic.Compatibility'. Follow the directions in Help.
 
Back
Top