473,405 Members | 2,373 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

Drive List Box

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?
Sep 22 '08 #1
5 5773
The file dialogs replace the whole set of controls you needed in earlier
versions of VB - the call to the dialog returns the selected file, so there
is no need for any list box.

If you really have to create and manage your own list of files, use the
FolderBrowserDialog, Directory.GetFiles and a FileInfo object, and whatever
type of collection you prefer.
http://msdn.microsoft.com/en-us/libr...serdialog.aspx

"Marge" <ma*******@googlemail.comwrote in message
news:b2**********************************@r66g2000 hsg.googlegroups.com...
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?
Sep 22 '08 #2
On 22 Sep, 10:43, "James Hahn" <jh...@yahoo.comwrote:

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.
Sep 22 '08 #3
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

"Marge" wrote:
On 22 Sep, 10:43, "James Hahn" <jh...@yahoo.comwrote:

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.
Sep 22 '08 #4
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

"Marge" <ma*******@googlemail.comwrote in message
news:df**********************************@i76g2000 hsf.googlegroups.com...
On 22 Sep, 10:43, "James Hahn" <jh...@yahoo.comwrote:

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.

Sep 23 '08 #5

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

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 :o(
Sep 23 '08 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Bond13579 | last post by:
I'm building a web application using PHP to play my mp3z. My first step is to just list the albums that I have. Each album is a folder on my hard drive. The problem I am having is that I'm...
3
by: James N | last post by:
My ASP.NET application needs read/write permissions for drive "Z:", which is mapped to my Linksys Gigadrive (Network Attached Storage...if anyone is familiar with that). If I configure the...
8
by: Chad | last post by:
To anyone who is smarter than I am when it comes to WMI: Here is what I am trying to do: 1) Detect a USB pen drive when it is inserted 2) Retrieve the drive letter of the pen drive 3) Check...
2
by: Kavitha | last post by:
Hi , Can any one tel me how to create a virtual drive in C#( similar to Gmail Virtual drive).Also tell me what interfaces could be used to create the same. Thanks in Advance Kavitha
2
by: kilik3000 | last post by:
Is there a way to catch an event/trigger that *might* be fired when a usb thumb drive is inserted into a Vista PC? The reason I ask is that I'd like to catch that event and back up the content...
4
by: Luc The Perverse | last post by:
Hi - I have very little C# programming experience. I am making a software product which calls for an interface almost identical to Windows Explorer - and I wondered if mounting a "virtual drive"...
3
by: Killer42 | last post by:
Hi all. Summary Plugging flash drive into work PC, no drive appears. Details First of all, I have searched TheScripts for an answer. The closest I found was this article which covered...
3
by: kinnu | last post by:
Hi How to list the names of all the folders in a drive ???? OR I have taken a Dir (directory list box) and text box. And using the timer, the selection of the the directories in the...
23
by: Rotsey | last post by:
Hi, I am writing an app that scans hard drives and logs info about every fine on the drive. The first iteration of my code used a class and a generic list to store the data and rhis took...
1
by: skygremlin | last post by:
I am trying to write a simple VB app to copy all directories and files off a thumb drive to a directory on a pc. I have a couple things I am trying to automate. Final Build will: - Have...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.