-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版本,都會忘記提醒您。 –