I have just purchased a new Dell Windows Vista Home Premium SP1 system.
One of my .NET 2.0 programs doesn't work on it. I have reduced it to the
tiny program below which fails in the same way.
On My old XP system, this code dsplays the OpenFileDialog, I select a
file and it logs the filename to the console.
On my Vista system, the OpenFileDialog never displays and the program
hangs on the ShowDialog method.
Does anyone have any ideas what is the cause? Is it a Vista config issue?
I can't reinstall the .NET 2.0 runtime as it says it is already
installed. I can't see anywhere in CP/Programs to uninstall it!
Shouldn't this just work out-of-the-box?
Thanks,
Nick
using System.Windows. Forms;
using System;
public class Test {
public static int Main(string [] args) {
Console.WriteLi ne ("OpenFileDialo g Test");
try {
OpenFileDialog ofd = new OpenFileDialog( );
Console.WriteLi ne ("Ready to show dialog");
if(ofd.ShowDial og() == DialogResult.OK ) {
Console.WriteLi ne ("Filename is {0}", ofd.FileName);
}
}
catch (Exception e) {
Console.WriteLi ne ("Exception is {0}", e.ToString());
}
return 0 ;
}
}
Comment