是调用主线程里的无模式对话框吧?

解决方案 »

  1.   

    There is a while loop in the thread.
    public void ThreadFunction()
    {
         int count=0;
         while (true)
        {
             count++;
             if(count==10||count==20)
             { 
                   newDialog  dlg=new newDialog();
                   dlg.show();
             }
              if(count==100)
              {
                    break;
                    
              }         Thread.Sleep();         
        }
    }
    newDialog is the modeless dialog which is to be shown.But when the "dlg.show();" runs, the application stops and couldn't do anything?Is there any methods to show modeless dialog in the thread?