本文介绍了什么是FileDialog.RestoreDirectory属性实际上呢?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我读过有关MSDN上的财产,但我还是不明白它做什么。

I've read about the property on MSDN, but I still don't understand what it does.

获取或设置一个值,指示
是否对话框恢复关闭前的
当前目录。

究竟是什么意思呢?什么是恢复当前目录实际上呢?感谢您的帮助。

What exactly does that mean? What does 'restoring' the current directory actually do? Thanks for the help.

推荐答案

IIRC中,当您按下Windows XP的保存 SaveFileDialog (或打开打开文件对话框 )该文件被保存(或打开)的目录,设置为新的当前工作目录(一个在 Environment.CurrentDirectory )。

IIRC, in windows XP when you press Save on a SaveFileDialog (or Open on a OpenFileDialog) the directory where the file is saved (or opened), is set as the new current working directory (the one in Environment.CurrentDirectory).

通过设置 FileDialog.RestoreDirectory = TRUE ,当您关闭的FileDialog 原工作目录恢复。

By setting FileDialog.RestoreDirectory = true, when you close the FileDialog the original working directory is restored.

在Windows Vista /七的行为始终是为 FileDialog.RestoreDirectory = TRUE (是的,即使你把它设置为false ...)。

In Windows Vista/Seven the behavior is always as FileDialog.RestoreDirectory = true (yes, even if you set it to false...).

这篇关于什么是FileDialog.RestoreDirectory属性实际上呢?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-13 18:54