473,387 Members | 1,536 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,387 software developers and data experts.

FileListBox from VB6?

Hi All!

I've been scouring the web to no avail, but what I'm looking for is
something similar to the FileListBox that was there in VB6 but seems to
have been removed (or moved) in 2005.

Does anyone know of a way to display a list of files in a given
directory, and allow the user to select one?

Any help would be great!

Aug 8 '06 #1
10 5163
Hello ko*********@gmail.com,

Dim tOpenDlg as OpenFileDialog = New OpenFileDialog

if tOpenDlg.ShowDialog = DialogResult.OK then
' The User selected tOpenDlg.Filename
end if

-Boo
Hi All!

I've been scouring the web to no avail, but what I'm looking for is
something similar to the FileListBox that was there in VB6 but seems
to have been removed (or moved) in 2005.

Does anyone know of a way to display a list of files in a given
directory, and allow the user to select one?

Any help would be great!

Aug 8 '06 #2
On 8 Aug 2006 15:14:26 -0700, ko*********@gmail.com wrote:
>Hi All!

I've been scouring the web to no avail, but what I'm looking for is
something similar to the FileListBox that was there in VB6 but seems to
have been removed (or moved) in 2005.

Does anyone know of a way to display a list of files in a given
directory, and allow the user to select one?

Any help would be great!
The old FleListBox is still available in VB2005. You will have to add it to the ToolBox to use it
as it is not in the ToolBox by default.

Gene
Aug 8 '06 #3
Hi,

The old FileListBox from VB6 is available in the Visual Basic powertools (or
something). But do you really need that, the ShowDialog introduced in VB
2003 is much nicer.

Cor

<ko*********@gmail.comschreef in bericht
news:11**********************@b28g2000cwb.googlegr oups.com...
Hi All!

I've been scouring the web to no avail, but what I'm looking for is
something similar to the FileListBox that was there in VB6 but seems to
have been removed (or moved) in 2005.

Does anyone know of a way to display a list of files in a given
directory, and allow the user to select one?

Any help would be great!

Aug 9 '06 #4
On Tue, 8 Aug 2006 22:49:42 +0000 (UTC), GhostInAK <gh*******@gmail.comwrote:
>Hello ko*********@gmail.com,

Dim tOpenDlg as OpenFileDialog = New OpenFileDialog

if tOpenDlg.ShowDialog = DialogResult.OK then
' The User selected tOpenDlg.Filename
end if

-Boo

Interesting how limited OP descriptions can produce differing interpretations.
As the OP did not mention DriveList and DirList, but only the FileListBox, one assumption is that
the OP is not working on a FileDialog, but rather after the functionality of the FileListBox. That
component was a specialized ListBox where simply using the Path property populated the box with all
the files in the directory specified in the Path Property. Typical use might be a picture viewer
where selecting a particular item in the box loads and displays the picture file. In this case,
OpenFileDialog would be inappropriate.

Having said that, I would probably use and populate the NET ListBox component rather than using the
VB6 FileListBox.

Gene
>I've been scouring the web to no avail, but what I'm looking for is
something similar to the FileListBox that was there in VB6 but seems
to have been removed (or moved) in 2005.

Does anyone know of a way to display a list of files in a given
directory, and allow the user to select one?

Any help would be great!
Aug 9 '06 #5
Hi all,

Thanks for all your answers, but Gene hit it on the head!

I'm not after creating a dialogue, but like his picture viewer example
I need to populate a list box with the files in a given directory,
which when clicked on will launch another program etc, so a dialogue
box isn't suitable.

I've looked at the ListBox, but (and I'm probably just being dumb here)
I can't figure out how to get it to list the contents of a directory.

Another reason for wanting the FileListBox is that it needs to filter
out different file types based on user options - an easy operation in
VB6!

Gene - I've looked for it but can't seem to find it anywhere. Is there
any chance you could tell me step-by-step how to enable it?

Thanks in advance!

- KokiriChild

gene kelley wrote:
On Tue, 8 Aug 2006 22:49:42 +0000 (UTC), GhostInAK <gh*******@gmail.comwrote:
Hello ko*********@gmail.com,

Dim tOpenDlg as OpenFileDialog = New OpenFileDialog

if tOpenDlg.ShowDialog = DialogResult.OK then
' The User selected tOpenDlg.Filename
end if

-Boo


Interesting how limited OP descriptions can produce differing interpretations.
As the OP did not mention DriveList and DirList, but only the FileListBox, one assumption is that
the OP is not working on a FileDialog, but rather after the functionality of the FileListBox. That
component was a specialized ListBox where simply using the Path property populated the box with all
the files in the directory specified in the Path Property. Typical use might be a picture viewer
where selecting a particular item in the box loads and displays the picture file. In this case,
OpenFileDialog would be inappropriate.

Having said that, I would probably use and populate the NET ListBox component rather than using the
VB6 FileListBox.

Gene
I've been scouring the web to no avail, but what I'm looking for is
something similar to the FileListBox that was there in VB6 but seems
to have been removed (or moved) in 2005.

Does anyone know of a way to display a list of files in a given
directory, and allow the user to select one?

Any help would be great!
Aug 9 '06 #6
Doh! Just found it! This is what you get for trying to program without
caffeine very late at night!

Thanks for all your help :-)

- KokiriChild

KokiriChild wrote:
Hi all,

Thanks for all your answers, but Gene hit it on the head!

I'm not after creating a dialogue, but like his picture viewer example
I need to populate a list box with the files in a given directory,
which when clicked on will launch another program etc, so a dialogue
box isn't suitable.

I've looked at the ListBox, but (and I'm probably just being dumb here)
I can't figure out how to get it to list the contents of a directory.

Another reason for wanting the FileListBox is that it needs to filter
out different file types based on user options - an easy operation in
VB6!

Gene - I've looked for it but can't seem to find it anywhere. Is there
any chance you could tell me step-by-step how to enable it?

Thanks in advance!

- KokiriChild

gene kelley wrote:
On Tue, 8 Aug 2006 22:49:42 +0000 (UTC), GhostInAK <gh*******@gmail.comwrote:
>Hello ko*********@gmail.com,
>
>Dim tOpenDlg as OpenFileDialog = New OpenFileDialog
>
>if tOpenDlg.ShowDialog = DialogResult.OK then
>' The User selected tOpenDlg.Filename
>end if
>
>-Boo
>

Interesting how limited OP descriptions can produce differing interpretations.
As the OP did not mention DriveList and DirList, but only the FileListBox, one assumption is that
the OP is not working on a FileDialog, but rather after the functionality of the FileListBox. That
component was a specialized ListBox where simply using the Path property populated the box with all
the files in the directory specified in the Path Property. Typical use might be a picture viewer
where selecting a particular item in the box loads and displays the picture file. In this case,
OpenFileDialog would be inappropriate.

Having said that, I would probably use and populate the NET ListBox component rather than using the
VB6 FileListBox.

Gene
>I've been scouring the web to no avail, but what I'm looking for is
>something similar to the FileListBox that was there in VB6 but seems
>to have been removed (or moved) in 2005.
>>
>Does anyone know of a way to display a list of files in a given
>directory, and allow the user to select one?
>>
>Any help would be great!
>>
>
Aug 9 '06 #7
Kokiri,

If you start using a hammer, than please try to use a that tool first.

In other words, read all the answers before you start to hit.

http://msdn.microsoft.com/vbasic/def...werpack_topic8

Cor

"KokiriChild" <ko*********@gmail.comschreef in bericht
news:11**********************@h48g2000cwc.googlegr oups.com...
Hi all,

Thanks for all your answers, but Gene hit it on the head!

I'm not after creating a dialogue, but like his picture viewer example
I need to populate a list box with the files in a given directory,
which when clicked on will launch another program etc, so a dialogue
box isn't suitable.

I've looked at the ListBox, but (and I'm probably just being dumb here)
I can't figure out how to get it to list the contents of a directory.

Another reason for wanting the FileListBox is that it needs to filter
out different file types based on user options - an easy operation in
VB6!

Gene - I've looked for it but can't seem to find it anywhere. Is there
any chance you could tell me step-by-step how to enable it?

Thanks in advance!

- KokiriChild

gene kelley wrote:
>On Tue, 8 Aug 2006 22:49:42 +0000 (UTC), GhostInAK <gh*******@gmail.com>
wrote:
>Hello ko*********@gmail.com,

Dim tOpenDlg as OpenFileDialog = New OpenFileDialog

if tOpenDlg.ShowDialog = DialogResult.OK then
' The User selected tOpenDlg.Filename
end if

-Boo


Interesting how limited OP descriptions can produce differing
interpretations.
As the OP did not mention DriveList and DirList, but only the
FileListBox, one assumption is that
the OP is not working on a FileDialog, but rather after the functionality
of the FileListBox. That
component was a specialized ListBox where simply using the Path property
populated the box with all
the files in the directory specified in the Path Property. Typical use
might be a picture viewer
where selecting a particular item in the box loads and displays the
picture file. In this case,
OpenFileDialog would be inappropriate.

Having said that, I would probably use and populate the NET ListBox
component rather than using the
VB6 FileListBox.

Gene
>I've been scouring the web to no avail, but what I'm looking for is
something similar to the FileListBox that was there in VB6 but seems
to have been removed (or moved) in 2005.

Does anyone know of a way to display a list of files in a given
directory, and allow the user to select one?

Any help would be great!


Aug 9 '06 #8
On 9 Aug 2006 08:38:38 -0700, "KokiriChild" <ko*********@gmail.comwrote:
>Hi all,

Thanks for all your answers, but Gene hit it on the head!

I'm not after creating a dialogue, but like his picture viewer example
I need to populate a list box with the files in a given directory,
which when clicked on will launch another program etc, so a dialogue
box isn't suitable.

I've looked at the ListBox, but (and I'm probably just being dumb here)
I can't figure out how to get it to list the contents of a directory.

Another reason for wanting the FileListBox is that it needs to filter
out different file types based on user options - an easy operation in
VB6!

Gene - I've looked for it but can't seem to find it anywhere. Is there
any chance you could tell me step-by-step how to enable it?

Thanks in advance!

- KokiriChild

Here with VB2005 Pro IDE:

Menu "Tool", "Choose Toolbox Items" (make take several seconds to show the dialog).
When the dialog shows, find "FileListBox" in the left column and 'check' it to add to the ToolBox.

Gene




>gene kelley wrote:
>On Tue, 8 Aug 2006 22:49:42 +0000 (UTC), GhostInAK <gh*******@gmail.comwrote:
>Hello ko*********@gmail.com,

Dim tOpenDlg as OpenFileDialog = New OpenFileDialog

if tOpenDlg.ShowDialog = DialogResult.OK then
' The User selected tOpenDlg.Filename
end if

-Boo


Interesting how limited OP descriptions can produce differing interpretations.
As the OP did not mention DriveList and DirList, but only the FileListBox, one assumption is that
the OP is not working on a FileDialog, but rather after the functionality of the FileListBox. That
component was a specialized ListBox where simply using the Path property populated the box with all
the files in the directory specified in the Path Property. Typical use might be a picture viewer
where selecting a particular item in the box loads and displays the picture file. In this case,
OpenFileDialog would be inappropriate.

Having said that, I would probably use and populate the NET ListBox component rather than using the
VB6 FileListBox.

Gene
>I've been scouring the web to no avail, but what I'm looking for is
something similar to the FileListBox that was there in VB6 but seems
to have been removed (or moved) in 2005.

Does anyone know of a way to display a list of files in a given
directory, and allow the user to select one?

Any help would be great!

Aug 9 '06 #9
Hello gene,

Too right. My answer came about as the end result of some quick assumptions
and personal preferences:
1. That the OP knew how to use their tools. I seem to have made the wrong
assumption here. I'd hate to see what they would do if their job was building
demolition or diamond cutting..

2. That in today's age of flashy UIs one would want something a little more
up-to-date than the dated FileListBox.

3. That the VB6 compatibility controls suck ass in general.

4. Seeing as assumptions 1, 2, and 3 had to be correct, the user must just
want to just provide a mechanism for selecting files, since (according to
the first 3 assumptions) they couldnt possibly want to be displaying them
on-screen.

But, seeing as how everyday on here seems to be amature hour, I don't feel
bad. You get what you pay for.

-Boo
On Tue, 8 Aug 2006 22:49:42 +0000 (UTC), GhostInAK
<gh*******@gmail.comwrote:
>Hello ko*********@gmail.com,

Dim tOpenDlg as OpenFileDialog = New OpenFileDialog

if tOpenDlg.ShowDialog = DialogResult.OK then
' The User selected tOpenDlg.Filename
end if
-Boo
Interesting how limited OP descriptions can produce differing
interpretations.
As the OP did not mention DriveList and DirList, but only the
FileListBox, one assumption is that
the OP is not working on a FileDialog, but rather after the
functionality of the FileListBox. That
component was a specialized ListBox where simply using the Path
property populated the box with all
the files in the directory specified in the Path Property. Typical
use might be a picture viewer
where selecting a particular item in the box loads and displays the
picture file. In this case,
OpenFileDialog would be inappropriate.
Having said that, I would probably use and populate the NET ListBox
component rather than using the VB6 FileListBox.

Gene
>>I've been scouring the web to no avail, but what I'm looking for is
something similar to the FileListBox that was there in VB6 but seems
to have been removed (or moved) in 2005.

Does anyone know of a way to display a list of files in a given
directory, and allow the user to select one?

Any help would be great!

Aug 10 '06 #10
Ok, before I let this go to rest I just want to say a few things :-)

Cor Ligthert: Thanks for the link, but I'd already found the control
when you'd posted. Also thanks for your help the first time round.
Can't see why you said the thing about the hammer considering you
couldn't provide a response the first time round. It's like me looking
for a hammer, and you said "nah, use the nail-gun". Gene told me where
the hammer was and you then got all pissy because you thought I might
be going for the nail-gun when I should've used the hammer.

GhostInAK: I dunno what you've got shoved up your arse, but suggest you
remove it. The OP doesn't nessecaraly know how to use the tools as this
may not be the OP's job. Infact, this isn't the OP's job, neither is
the OP a demolition expert or a diamond cutter. The OP does all 3 for
hobbies. You have provided NOTHING to this discussion, other than a
reminder of why I never use newsgroups - You get a bunch of elitest
assholes such as yourself who presume to know everything and never give
anyone the answers they're looking for. You presumed I was wanting to
create a dialogue box - you were wrong. You presume I want a flashy GUI
- You're wrong. "RTFM!"? - Get a fucking life!

Gene: You're the only one who was polite and helpful throughout. It
pains me that for every Gene out there, there are 20 GhostInAKs. You
read my question and answered it as I wanted it, and made no
assumptions about my program, why I wanted the controls or trying to
impose your flashy-GUI-diamond-cutting attitude upon me (and I doubt
you even have one). Thanks for not letting this experience be a total
waste, you're a pearl amongst the pigshit!

- KokiriChild

GhostInAK wrote:
Hello gene,

Too right. My answer came about as the end result of some quick assumptions
and personal preferences:
1. That the OP knew how to use their tools. I seem to have made the wrong
assumption here. I'd hate to see what they would do if their job was building
demolition or diamond cutting..

2. That in today's age of flashy UIs one would want something a little more
up-to-date than the dated FileListBox.

3. That the VB6 compatibility controls suck ass in general.

4. Seeing as assumptions 1, 2, and 3 had to be correct, the user must just
want to just provide a mechanism for selecting files, since (according to
the first 3 assumptions) they couldnt possibly want to be displaying them
on-screen.

But, seeing as how everyday on here seems to be amature hour, I don't feel
bad. You get what you pay for.

-Boo
On Tue, 8 Aug 2006 22:49:42 +0000 (UTC), GhostInAK
<gh*******@gmail.comwrote:
Hello ko*********@gmail.com,

Dim tOpenDlg as OpenFileDialog = New OpenFileDialog

if tOpenDlg.ShowDialog = DialogResult.OK then
' The User selected tOpenDlg.Filename
end if
-Boo
Interesting how limited OP descriptions can produce differing
interpretations.
As the OP did not mention DriveList and DirList, but only the
FileListBox, one assumption is that
the OP is not working on a FileDialog, but rather after the
functionality of the FileListBox. That
component was a specialized ListBox where simply using the Path
property populated the box with all
the files in the directory specified in the Path Property. Typical
use might be a picture viewer
where selecting a particular item in the box loads and displays the
picture file. In this case,
OpenFileDialog would be inappropriate.
Having said that, I would probably use and populate the NET ListBox
component rather than using the VB6 FileListBox.

Gene
>I've been scouring the web to no avail, but what I'm looking for is
something similar to the FileListBox that was there in VB6 but seems
to have been removed (or moved) in 2005.

Does anyone know of a way to display a list of files in a given
directory, and allow the user to select one?

Any help would be great!
Aug 12 '06 #11

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

Similar topics

2
by: martijn | last post by:
Probably not the first time this one is asked in this group... The standard filelistbox does what it says, it lists files. But as all windows based dialogs offer file details etc. I think it...
1
by: Thomas Bender | last post by:
Hi, i'm new to C# and tray to count the files in a "FileListBox", please help, thanks. Thommy
1
by: Vernon Gainous | last post by:
Does VB.NET have it's own set of controls for accessing the file system. VB6 had a DriveListBox, DirListBox, and FileListBox controls. Where are these controls for VB.NET?
6
by: Just Me | last post by:
Is there available DotNet code to replace the VB6 FileListBox and DirListBox, keeping the original appearances? Thanks in advance for any help
2
by: Lennart Nielsen | last post by:
I'm trying to use the FileListBox, but it does not seem to have the ListCount property or any substitute. Any bids on this or another way (short of the old DOS routine) to get a countable listing...
0
by: akoymakoy | last post by:
how do i link my dirlistbox to the filelistbox viceversa... I would like to use the path of the file selected in the filelistbox as a variable that i would use as a location for the DB that i will...
9
by: =?Utf-8?B?U2NhbmJveQ==?= | last post by:
Guyz, I have just learnt how to add the 'DriveListBox', 'DirListBox' and 'FileListBox' controls that were always included in the toolbox with VB 3.0 / 4.0 / 5.0, but always missing in VBE 2005....
1
by: Suryakant V Kirloskar | last post by:
I've developed an interface in VB6 whereby I will be selecting text file to extract relative data to Oracle. I'm able to select one file from FileListBox and process. I want to automate this process...
0
by: Cancionero | last post by:
All, This is a simple problem that I, for some reason, am having a hard time with. Basically I am trying to rename all the files listed in a FileListBox based on a search and replace string. I...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.