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).
By setting FileDialog.RestoreDirectory = true, when you close the FileDialog the original working directory is restored.
In Windows Vista/Seven the behavior is always as FileDialog.RestoreDirectory = true (yes, even if you set it to false...).
By setting FileDialog.RestoreDirectory = true, when you close the FileDialog the original working directory is restored.
In Windows Vista/Seven the behavior is always as FileDialog.RestoreDirectory = true (yes, even if you set it to false...).
设置过路径之后 导致应用程序中使用相对路径的地方全部出错,终于找到了答案。