0

我怎样才能设置MdiParent在不同的表单上运行Thread

 Form2 _frmloading;
        private void thread2()
        {
            _frmloading = new Form2();
            _frmloading.TopMost = false;
            _frmloading.ShowInTaskbar = false;
            //Doesn't Work
            //MethodInvoker method = new MethodInvoker(delegate
            //    {
            //        _frmloading.MdiParent = this;
            // });
            // method.Invoke();

            //what do i write here?

            _frmloading.ShowDialog();
        }
        private void button1_Click(object sender, EventArgs e)
        {
            Thread LoadThread = new Thread(new ThreadStart(thread2));
            LoadThread.SetApartmentState(ApartmentState.STA);
            LoadThread.Start();
        }

这个有可能?

4

0 回答 0