Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / WinForm General / February 2007

Tip: Looking for answers? Try searching our database.

Syntax to get filename list from Multi-select Open file Dialog

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
ElmoWatson - 26 Feb 2007 23:29 GMT
I need to get the list of files, in a multi-select OpenFileDialog,
formatting the list for my purposes (adding to an array)

I can't seem to grasp the syntax - - here's part of what I've tried, after
creating two variables (s and sList):
Dim sList as String() '< - array I want to use

Dim ofd As New OpenFileDialog
For Each s In ofd.FileNames
' what do I put here to add the item in the array?
Next

or, is it an array anyway? If so, I do I access it?

I just need to pass an existing array to another method, using the filenames
in the OFD
Patrick Steele - 27 Feb 2007 01:26 GMT
> I need to get the list of files, in a multi-select OpenFileDialog,
> formatting the list for my purposes (adding to an array)
[quoted text clipped - 9 lines]
>
> or, is it an array anyway?

Yes, the Filenames property is already a string array.

> If so, I do I access it?

You can use For/Each like you're doing in your sample.

Signature

Patrick Steele
http://weblogs.asp.net/psteele


Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.