C# .net application openfile Dialog works in win xp not in win 7 (32 bit or 64 bit)
public void spawnVr_Monthly() {
vrMonthlyProcessingThread = new Thread(new ThreadStart(process_Vr_Monthly_File));
vrMonthlyProcessingThread.Start();
}
public void process_Vr_Monthly_File() {
OpenFileDialog vrmpf = new OpenFileDialog();
vrmpf.AutoUpgradeEnabled = true;
vrmpf.Title = "Select VR Monthly Parking file to process";
vrmpf.Fil开发者_运维知识库ter = "VR Monthly Parking File (VRMTHY_OUT*.TXT|*.TXT";
}
Do you have [STAThread]
attribute on your Main() function?
And I think you'd better spawn this dialog on UI thread not just any background. Use SynchronizationContext or Control.Invoke() to run something on UI thread.
精彩评论