OpenFileDialog.OpenFile() in C# under .NET Compact Framework

G

Guest

Hi!
I am trying to make an application to run under windows CE 4.2 where I have
to open a file, to get some info from it.
Now my problem is that the method OpenFile() is not supported for Compact
framework. How can I do this?
 
G

Guest

Use the dialog's FileName property and one of the System.IO classes (like
the TextReader) to open and read the file.

-Chris
 
G

Guest

Thanks!
Is it possible at come whith an example, or do anyone have a link to an
example?
 
B

Brian Nantz

That depends on the kind of file you are opening but you could try
something like this (this is psuedocode):

OpenFileDialog ofd = new OpenFileDialog();
ofd.ShowDialog();
File.Open(ofd.FileName, .....)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top