|
也许是楼主的用法有点问题吧,下面的代码是我在wince上测试成功的,楼主可以参考一下。
string filename;
openFileDialog1.InitialDirectory = Environment.GetFolderPath(Environment.SpecialFolder.Personal);
openFileDialog1.Filter = "所有文件(*.*)|*.*";
if (openFileDialog1.ShowDialog() == DialogResult.OK)
{
filename=openFileDialog1.FileName;
} |
|