Drive List Box

M

Marge

are there any examples of suggested methods to get the same results as
the old DriveListBox & DirListBox from VB6.

Express uses the openfiledialog but examples would be a great time
saver, useful to see things in action to get a better idea.

The openfiledialog isn't a visible object so I'm guesiing its used in
conjuction with a standard combobox?
 
M

Marge

Thanks James,

did copy & run the code sample, its a useful learning sample for me
but I did really want the visual effect of a drive list & folder list
which give the user visual clues to where they are continually.

The project I was re-writing in Express was a very simple sound file
player, just wanted the practice of writing it in .net but it seems
too difficult unless I add com references to the project which sort of
defeats the object.
 
K

Kerry Moorman

Marge,

Environment.GetLogicalDrives returns an array containing the names of the
logical drives on the current computer. You could display the array in a
listbox or combobox as a way to emulate the Drive list box.

Directory.GetDirectories gets the names of subdirectories in a specified
directory. You could display the results in a listbox, etc.

Directory.GetFiles gets the names of files in a particular directory. You
could display the results in a listbox, etc.

Kerry Moorman
 
G

GHim

Check out Shell MegaPack shell browser UI components from
http://www.ssware.com
Same as Windows Explorer, plus controls so they sit right on your own form
(unlike OpenFileDialog).
They are commercial though.

GHim
 
M

Marge

Thanks Kerry thats about as good as it going to get I guess. It seems
VISUAL BASIC really as become much less VISUAL :blush:(

The simple beauty of VB was the fact that you dragged a visual image
of the control you wanted to use onto your form which then gave you
coding clues, now it seems you have to do so much more in code with
less visual help.

The sample that James linked to shows how to search & open RTF files,
this is a MS sample but it doesn't link or show how to do the same for
any other file type I may want to do a similar thing with, why do they
have to make everything so time consuming I seems to spend far to much
time looking for examples than I do actually using VB?

I need an EXCELLENT book or I think I best save my time :blush:(
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top