开发者

openFileDialog.Title

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;
}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜