开发者

openFileDialog.Title

开发者 https://www.devze.com 2023-01-16 16:29 出处:网络
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

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

精彩评论

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