Re: How do I list files in directory?
From: kyote (truthowl_at_NOSPAM.charter.net)
Date: 04/02/04
- Next message: kyote: "Displaying hidden drives-directories and files"
- Previous message: Larry Serflaten: "Re: "table" advice"
- In reply to: MikeD: "Re: How do I list files in directory?"
- Next in thread: Larry Serflaten: "Re: How do I list files in directory?"
- Messages sorted by: [ date ] [ thread ]
Date: Fri, 02 Apr 2004 01:11:15 -0600
On Thu, 1 Apr 2004 22:37:36 -0500, "MikeD" <nobody@nowhere.edu> wrote:
>
>"kyote" <truthowl@NOSPAM.charter.net> wrote in message
>news:p0kp60toavhqs61rib0scempd66vu5nr3i@4ax.com...
>> Which control do I use to list files in a directory? Listbox? I'm not
>> connecting to a DB I just want to list every file in a given
>> directory. I just want to know which control's to use, not how to do
>> it. I've realized that I'm jumping wayyy to far ahead of myself by
>> trying to understand ADO and such when my understanding of VB's basics
>> is still very unstable. So I'm wanting to platy around with this. Can
>> someone tell me which controls I need? Please? This isn't for work or
>> school for time isn't critical. Thanks in advance!!
>
>
>You ARE really lost. It's got nothing to do with ADO. ADO stands for
>"ActiveX Data Objects". It's used for accessing data in databases. Getting
>a list of files in a directory has NOTHING to do with databases. VB has an
>intrinsic control for listing files in a given directory. It's called a
>FileListBox. Generally speaking, you shouldn't use it because it's very
>antiquated, but VB provides no other intrinsic alternative. To use the more
>"modern" Explorer-style list of files and/or folders, you need to write it
>yourself using the Treeview and ListView controls.
Ouch! I re-read what I posted and it does look like I was considering
ADO for listing files in a directory. Sorry about that Mike. What I
meant is, I've been playing around with VB trying to learn it by
experience. I wanted to create simple little apps that were useful in
helping me learn VB. But I was trying to work with ADO and I kept
getting severely frustrated as you pointed out below. That kept making
me think I chose the wrong career... So I finally decided I needed to
learn to walk before I try to run.
>However, since you're apparently very new to VB, you need to learn the
>basics of the language first. Therefore, you should probably use VB's
>FileListBox (otherwise, you'll just be trying to learn too much at once, get
>overwhelmed by it, and won't learn anything). You'll find it in the Toolbox
>window. Consult VB's Help on its properties, methods, and how to use it.
I was considering Treeview but the tutorials I googled up were still
beyond me. Thanks for the advice. I'm using Drive/Dir/FileListBox's
and my confidence is improving noticeably. Even my excitement over
coding is improving. God Bless You!
And thank you to Larry and Ruskin too!! Ruskin your little code
snippet got me on the right track immediately. Thank you. And Larry, I
almost always use the search feature and had rarely considered using
the Index. Thank you for that advice as well, which, I think, will be
useful even away from VB.
-------
Kyote.sends("Greetings");
- Next message: kyote: "Displaying hidden drives-directories and files"
- Previous message: Larry Serflaten: "Re: "table" advice"
- In reply to: MikeD: "Re: How do I list files in directory?"
- Next in thread: Larry Serflaten: "Re: How do I list files in directory?"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|