当前位置:首页
开发技术指南» 文章正文
    引言:
 

 

 ·简单的update出错,各位大侠    »显示摘要«
    摘要: dim strconstr as string = "provider=microsoft.jet.oledb.4.0;data source=e:\程序\asp.net网页\ip\mdb\ip.mdb" dim strcamstr as string = "select * from ipup" dim dsca as oledbdataada......
    摘要: 我的猫在windows下显示的型号是lucent win modem, 我现在装了redhat 9.0, 猫找不到,请问哪里有驱动下,最好再简单讲一下下了以后怎么装。 万分感谢。 一成功马上给分 ......


郁闷的来问一个简单问题……

怎么我在一个winform里面start的一个线程,在关闭了那个子窗体后,那个线程还在运行阿?  
  子窗体是这样调用的:xxx   Myxxx   =   new   xxx();  
                                          Application.Run(Myxxx);  
  子窗体里面的线程是这样开始的:  
                                          yyy   Myyyy   =   new   yyy();//yyy是另外一个窗体  
                                          Thread   MyThread   =   new   Thread(new   ThreadStart(yyy.Show));  
                                          MyThread.Isbackground   =   true;  
                                          MyThread.Start();  
                                          This.Close();//就是这里,关不了阿,本窗体是关了,但是新建的线程没有关阿!  
  郁闷阿!在线等各位的回答  
 

NO.1   作者: saucer

it   is   a   new   thread,   it   has   nothing   to   do   with   your   window,   if   you   need   to   specifically   stop   it,   call  
  MyThread.Abort();  
   
  Also,   your   thread   is   a   background   thread,   it   is   terminated   when   all   the   forebackground   threads   in   the   same   process   have   terminated

NO.2   作者: xixigongzhu)

在主窗体里,定义MyThread为全局变量(字段)。

NO.3   作者: zhongwanli

个人认为,你既然做的是线程  
  那可以说是与你的应用程序没什么关系  
  如果要释放的话,我估计也应该是你自己手动的去除吧  
   
  *********************  
  个人意见,公供参考


 ·如何保存修改过的shp文件    »显示摘要«
    摘要: 在图层上描点后,如何保存到shp文件?delphi+mo ......
» 本期热门文章:

©2000-2007 All Rights Reserved. 最佳浏览:1024X768 MSIE