Hi Anton,
I just encountered this problem on 1 of my client's PC running windows 7 64 bit.
In my case, the thread started and the main thread did not wait for the dialog thread.
Thus whatever file the user select did not get into my variable.
I don't know if this can help you.
Can you try to put a thread.sleep(500) in your code below ?
static string ShowDialog()
{ OpenFileDialog ofd = new OpenFileDialog();
Thread dlgThread = new Thread( showDialog );
dlgThread.SetApartmentState( ApartmentState.STA );
dlgThread.Start(ofd);
System.Threading.Thread.Sleep(500); //<--------- HERE
dlgThread.Join();
return ofd.FileName;
}
I know it is does not make any sense, but just try and see if it works for you..
Regards
Edy