We are using VS2008, but I haven't noticed this. But then, we retain
the last folder the user selected, and set the InitialDirectory before
opening the file dialog the next time...
Good luck.
RobinS.
GoldMail, Inc.
-------------------------------------------
<(E-Mail Removed)> wrote in message
news:66e58a8a-5b6b-4c04-ace2-(E-Mail Removed)...
> Hi all,
>
> I have an app that relies on OpenFileDialog to change the current
> working directory based on the user selection (i.e.
> OpenFileDialog.RestoreDirectory = false). It was working fine on
> WinXP/2003/Vista. But after I install VS 2008 (which also installed
> KB110806 (.Net 2.0 Framework SP1), KB929300 (.Net 3.0 Framework SP2)),
> the OpenFileDialog no longer changes the current working directory on
> Vista. I wrote a sample app to display the current directory before
> and after OpenFileDialog, and the sample app works on:
>
> - XP, with KB110806, KB929300 and .Net Framework 3.5 installed.
> - 2003, with KB110806, KB929300, .Net Framework 3.5 installed, VS 2008
> installed.
>
> but it doesn't work on Vista with VS 2008 installed. Here's the code-
> behind:
>
> public partial class Form1 : Form
> {
> public Form1()
> {
> InitializeComponent();
> }
>
> private void Form1_Load(object sender, EventArgs e)
> {
> _lblBefore.Text =
> System.IO.Directory.GetCurrentDirectory();
> }
>
> private void button1_Click(object sender, EventArgs e)
> {
> DialogResult result = openFileDialog1.ShowDialog();
> if (result == DialogResult.OK)
> {
> _lblAfter.Text =
> System.IO.Directory.GetCurrentDirectory();
> }
> }
>
> }
>
> Does anyone have a similar problem?
|