我用vs2005 team beta2 写了一个openfiledialog的showdialog()时,总是出现运行时错误,调试时出错结果如下:ThreadStateException was unhandledCurrent thread must set to single thread apartment (STA) mode before OLE calls can be made. Ensure that your Main function has STAThreadAttribute ed on it.不知道各位大大遇到过没有,怎么解决啊?不胜感激!
我用vs2005 team beta2 写了一个openfiledialog的showdialog()时,总是出现运行时错误,调试时出错结果如下:ThreadStateException was unhandledCurrent thread must set to single thread apartment (STA) mode before OLE calls can be made. Ensure that your Main function has STAThreadAttribute ed on it.不知道各位大大遇到过没有,怎么解决啊?不胜感激!
[STAThread]
static void Main()
{
.....
}