를 실행할 수 있습니다 finalreport의 OnClosing 이벤트에 귀하의 코멘트에 또한
는, 당신은 당신의 최종의 이벤트
FormClosed
에 대한 이벤트 처리기를 추가 할 수 있습니다 형태 :
FinalForm f = new FinalForm();
f.FormClosed += (s,e) => {
StartupForm sf = new StartupForm();
sf.Show;
//if your StartupForm is defined somewhere
//just call sf.Show();
};
//If you are using VS 2005 or below, you have to define a method for FormClosed event handler (unable to use the lambda expression above
private void FormClosedHandler(object sender, FormClosedEventArgs e){
StartupForm sf = new StartupForm();
sf.Show;
//if your StartupForm is defined somewhere
//just call sf.Show();
}
//Register the FormClosed event with the event handler above
f.FormClosed += new FormClosedEventHandler(FormClosedHandler);
//show your final form
f.Show();
//if this form is closed, the event FormClosed will be raised and the corresponding event handler (we added above) will be called.
'최종 보고서'양식을 어떻게 보여 줬습니까? 양식을 어떻게 구성하는지 알고 싶습니다. 예를 들어, 대개 내 메인 폼의 클래스에 내 하위/하위 양식 멤버가 정의되어 있습니다. 그래서 하위 폼을 하위 폼으로 쉽게 보여줄 수 있습니다. –
나는 모든 양식을 개별적으로 작성하고 필요할 때마다 다음과 같은 특정 양식에 오브젝트를 작성하여 호출합니다. 첫 번째 양식. secondform fr = 새 secondform(); fr.show(); – rtvalluri