2013-02-17 2 views

답변

0

장소 코드를 재정의 할 수

newform nf = new newform(); //or whatever the name of your second form is 
this.Hide(); //to hide your mainform 
nf.ShowDialog(); 
this.Show(); //to show your mainform after closing your new form 
nf.Dispose(); //optional 
+0

정말 고마워 !!! :디 – Ryan

0

당신은 당신의 button_click 이벤트에 OnFormClossing 이벤트를

protected override void OnFormClosing(FormClosingEventArgs e) 
{ 
    // code that u want 
} 
+0

질문. 나는 이것을 어떻게 놓을 것이고 두 가지 형태가 어떻게 서로 의사 소통을 할 것인가? – Ryan

+0

당신은 form2.ShowDialog()를 사용하려고 했습니까; 이게 뭐지? U가 필요한거야 –

관련 문제