-1
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.Filter = "VR Monthly Parking File (VRMTHY_OUT*.TXT|*.TXT";
}
你真的显示对话框吗?您显示的代码不完整。 –
OpenFileDialog不能用于非STA的工作线程。有关详细信息,请参阅Thread.SetApartmentState()。无论您在该XP机器上使用哪种.NET版本,都会忘记提醒您。 –