|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
OpenFileDialogue questionI just want the name of the file selected - I have no use for opening it up
in a stream. Is there a built-in dialogue I can use to select a file, or do I need to write my own? If so, are there any simple examples out there? TIA, Paul You would use the same OpenFileDialog, it exposes a property FileName which
will give you the full path/name of the file selected. Or use FileNames if you have multiselect set to true... Regards, Michael Bosch Show quoteHide quote "PJ6" <no***@nowhere.net> wrote in message news:O7kVhagdGHA.4720@TK2MSFTNGP03.phx.gbl... >I just want the name of the file selected - I have no use for opening it up >in a stream. > > Is there a built-in dialogue I can use to select a file, or do I need to > write my own? If so, are there any simple examples out there? > > TIA, > Paul > "Michael Bosch" <dotnetmich***@gmail.com> schrieb: ACK. If you want to strip off the path and get the file name part only, > You would use the same OpenFileDialog, it exposes a property FileName > which will give you the full path/name of the file selected. Or use > FileNames if you have multiselect set to true... check out the shared methods of 'System.IO.Path'. -- M S Herfried K. Wagner M V P <URL:http://dotnet.mvps.org/> V B <URL:http://classicvb.org/petition/> I think I want to add a new word to the English language. One that means,
"when one looks for a property or method in an intellisense list, but for some strange reason cannot find it even though it's plainly there". Show quoteHide quote "Michael Bosch" <dotnetmich***@gmail.com> wrote in message news:CK69g.42209$Kn4.4784@bignews2.bellsouth.net... > You would use the same OpenFileDialog, it exposes a property FileName > which will give you the full path/name of the file selected. Or use > FileNames if you have multiselect set to true... > > Regards, > > Michael Bosch > > "PJ6" <no***@nowhere.net> wrote in message > news:O7kVhagdGHA.4720@TK2MSFTNGP03.phx.gbl... >>I just want the name of the file selected - I have no use for opening it >>up in a stream. >> >> Is there a built-in dialogue I can use to select a file, or do I need to >> write my own? If so, are there any simple examples out there? >> >> TIA, >> Paul >> > > |
|||||||||||||||||||||||