private void formProgressor()
        {
            //if (frm.Handle == IntPtr.Zero)
            //    frm = new ProgressForm(this);

            frm.BeginInvoke(new MethodInvoker(delegate
            {
                if (this.MainWindow != null)
                {
                    frm.ShowDialog(this.MainWindow);
                }
                else
                {
                    frm.ShowDialog();
                }
            }
                                              ));
        }