OpenFileDialog.Title file is not d开发者_Go百科efined in my visual studio2008, so I am not able to open a file for a smartdevice application. Please tell me what to do.
You don't need to set the Title of the dialog to open a file with a OpenFileDialog
on a SmartDevice. If you add a button and handle its Click event for instance, you can add some code similar to this to get a filename from a OpenFileDialog
OpenFileDialog openFileDialog1 = new OpenFileDialog();
DialogResult result = openFileDialog1.ShowDialog();
if (result == DialogResult.OK) {
string file = openFileDialog1.FileName;
}
精彩评论