在线程里打开窗口
摘要:
public void threadCreateTXT() { Thread thread = new Thread(new ThreadStart(createTXT)); thread.SetApartmentState(ApartmentState.STA);//当方法里有打开窗口的内容时,没有这句会异常 thread.Start(); }private void createTXT() { OpenFileDialog odf = new OpenFileDialog(); if (odf.ShowDialog() == DialogResult.OK) { C1XLBook book 阅读全文
posted @ 2012-09-26 17:20 kristy~ 阅读(189) 评论(0) 推荐(0) 编辑