Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Search for file at run-time
Message
From
06/10/2004 12:06:28
 
General information
Forum:
ASP.NET
Category:
Other
Miscellaneous
Thread ID:
00949224
Message ID:
00949229
Views:
7
Einar,

Do you mean having the user select a file? If so, something like this would work:
System.Windows.Forms.OpenFileDialog oSelectFile = new System.Windows.Forms.OpenFileDialog();
DialogResult dr = oSelectFile.ShowDialog();

if(dr == DialogResult.OK) 
{
  // oSelectFile.FileName contains the name of the file selected.
}
~~Bonnie

>How would I go about searching for a file on My Computer at run time?
>I might want to narrow the search down to only local drives, in that case how can I get an array or collection of local drives?
>
>Thanks,
>Einar
Bonnie Berent DeWitt
NET/C# MVP since 2003

http://geek-goddess-bonnie.blogspot.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform