示例#1
0
 private void RunComplete(object sender, RunWorkerCompletedEventArgs e)
 {
     if (frmW != null)
     {
         frmW.Hide();
         frmW = null;
     }
 }
示例#2
0
        private void btnProcess_Click(object sender, EventArgs e)
        {
            BackgroundWorker bw = new BackgroundWorker();

            bw.DoWork             += new DoWorkEventHandler(fnProcess);
            bw.RunWorkerCompleted += new RunWorkerCompletedEventHandler(RunComplete);
            frmW = new frmWait();
            bw.RunWorkerAsync();
            frmW.ShowDialog();
            frmW = null;


            //fnProcess();
        }