this.BeginInvoke(new Action(() => {//这种方式可以让弹框是ShowDialog方式,主窗体不能点击 DialogResult dr = MessageBox.Show("需要更新!确定下载", "系统提示", MessageBoxButtons.OKCancel); if (dr == DialogResult.OK) { } else if (dr == DialogResult.Cancel) { } }));
转 : https://bbs.csdn.net/topics/394746683?list=60013518