473,327 Members | 2,074 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,327 software developers and data experts.

FileListBox

Hi,

i'm new to C# and tray to count the files in a "FileListBox",
please help, thanks.

Thommy
Nov 16 '05 #1
1 5868
On Thu, 7 Oct 2004 16:08:49 +0200, Thomas Bender
<Th***********@de.Bosch.com> wrote:
Hi,

i'm new to C# and tray to count the files in a "FileListBox",
please help, thanks.

Thommy


Hi Thomas,

It's a little bit unclear what you are trying to do.
Do you mean you want to fill a ListBox with files?

You can get a list of files from a directory using Directory.GetFiles()
Something like this will fill a ListBox with all files in the c:\ directory

listBox1.Items.AddRange(Directory.GetFiles("C:\\") );

--
Happy Coding!
Morten Wennevik [C# MVP]
Nov 16 '05 #2

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: 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
1
by: Gordon | last post by:
I'm an experienced VB6 programmer, but using VB.net for the first time. I'm trying to set up a FileListBox, and having trouble getting the control to display the files that are in the directory...
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...
10
by: kokirichild | last post by:
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...
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....
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: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.