本文介绍了块,直到窗体关闭?的WinForms的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有启动formB一种形式。我想备考被隐藏,直到formb关闭。可能有变化formb由formC打开和其他人,所以我干脆着刚刚创造的新形式。有没有一种方法来启动formB,隐藏和块直到接近?

I have a form that launches formB. I would like forma to be hidden until formb is closed. There may be a change formb is opened by formC and others so i simply cant just create a new form. Is there a way to launch formB, hide and block until close?

推荐答案

这应该这样做。

this.Visible = false;
using (formB as new FormB())
    formB.ShowDialog(this);
this.Visible = true;

这篇关于块,直到窗体关闭?的WinForms的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-15 14:21