SaveFileDialog问题 [英] SaveFileDialog problem

查看:85
本文介绍了SaveFileDialog问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好!


我遇到了SaveFileDialog的问题。在我的程序中,用户必须能够选择一个他没有写权限的目录(权利是由程序稍后处理的
)。


现在我已经设置了属性CheckPathExists为了

防止创建此错误消息(我从德语翻译):

"无法访问该文件。检查安全权限。


问题是:尽管如此,如果选择已存在的文件名为

文件名,则会显示该错误消息目录(虽然

" OverwritePrompt"也设置为False!)。


所以我找不到办法摆脱这个愚蠢的错误信息!

有什么想法吗?


最好的问候

Robert Schwortschik

Hi there!

I''ve got a problem with the SaveFileDialog. In my program, the user must be
able to choose a directory where he has no writing rights (the rights are
handled by the program later).

Now I''ve already set the property "CheckPathExists" to False in order to
prevent that this error message is created (I translate from German):
"The file cannot be accessed. Check the security rights".

The problem is: Despite of this, that error message is shown now if a
filename is chosen that already exists in that directory (although
"OverwritePrompt" is also set to False!).

So I cannot find a way to get rid of this stupid error message!
Any ideas?

Best regards
Robert Schwortschik

推荐答案

嗨罗伯特,


你能不能使用folderbrowserdialog。

这是VS 2003中的新功能,微软稍微告知在VS 2002上它是一个

的补充。


Herfried.K.Wagner总是说它有一个可怕的bug因为那里

是当你打开超过128个字符的路径时你的

程序可以挂起的消息。


也许它有帮助吗?

Cor
Hi Robert,

Can you not use the folderbrowserdialog for this.
It is new in VS 2003 and slightly is told by Microsoft that it is an
addition on VS 2002.

Herfried.K.Wagner is always telling that it has a terrible bug because there
are messages that when you open a path longer than 128characters your
program can hang.

Maybe it helps?

Cor


问题是,我希望用户也指定文件名。

使用FolderBrowserDialog,用户只能选择一个文件夹。

" Cor" < no*@non.com> schrieb im Newsbeitrag

新闻:#g ************** @ TK2MSFTNGP12.phx.gbl ...
Well, the problem is, that I want the user also to specify a filename.
Using the FolderBrowserDialog the user can only choose a folder.
"Cor" <no*@non.com> schrieb im Newsbeitrag
news:#g**************@TK2MSFTNGP12.phx.gbl...
嗨罗伯特,

你能不能使用folderbrowserdialog。
它是VS 2003中的新功能,微软告诉它它是VS 2002的另外一个补充。
< Herfried.K.Wagner总是说它有一个可怕的错误,因为
有消息说当你打开一个长度超过128个字符的路径时你的
程序就会挂起。
也许有帮助吗?

Hi Robert,

Can you not use the folderbrowserdialog for this.
It is new in VS 2003 and slightly is told by Microsoft that it is an
addition on VS 2002.

Herfried.K.Wagner is always telling that it has a terrible bug because there are messages that when you open a path longer than 128characters your
program can hang.

Maybe it helps?

Cor






和比起为什么不是openfiledialog?

对于我来说,使用带有

写保护的目录中的savefiledialog听起来很奇怪


And than why not the openfiledialog?

It sounds so strange for me to use a savefiledialog on a directory with
write protection


这篇关于SaveFileDialog问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆