實際功能是這樣,開啟子視窗後,父視窗就是主介面隱藏掉,可以看到電腦桌面。
然後關閉子視窗後,父視窗顯示出來。
查了下貼,說要重新new 父視窗?不是很懂,請高手指教。
開啟子窗體
[code=csharp]
private void button1_click(object sender, eventargs e)
}關閉子窗體的closed事件
private void form2_formclosed(object sender, formclosedeventargs e)
我直接在按鈕控制項中,先用this.hide(),然後form2.showdialog(),再this.show(), form2.dispose(),就實現了我需要
小蜜蜂論壇回帖機
的效果。謝謝
c 如何實現子視窗關閉父視窗也關閉
其實是視窗間通訊的問題,在form1上開啟form2 form2 關閉時關閉form1 實現方法 在子視窗form2中宣告事件 public delegate void childclose public event childclose closefather 然後在它的關閉事件中觸發本事件 pr...
c 如何實現子視窗關閉父視窗也關閉
其實是視窗間通訊的問題,在form1上開啟form2 form2 關閉時關閉form1 實現方法 在子視窗form2中宣告事件 public delegate void childclose public event childclose closefather 然後在它的關閉事件中觸發本事件 pr...
c 實現子視窗關閉父視窗也關閉的簡單例項
其實是視窗間通訊的問題,在form1上開啟form2 form2 關閉時關閉form1 實現方法 在子視窗form2中宣告事件 public delegate void childclose public event childclose closefather 然後在它的關閉事件中觸發本事件 pr...