C# - 대화상자

// 대화상자 만들기
class MyDialog : Form{
    //...
}



//대화상자  모달로 띄우기
MyDialog dlg = new MyDialog();
DialogResult dr = dlg.ShowDialog();
if(dr == DialogResult.OK){
    //...OK 버튼이 클릭되었을 때의 작업
}else{
    //...
}



// 대화상자  모달리스로 띄우기
MyDialog dlg = new MyDialog();
dlg.Owner = this; //부모 폼
dlg.Show ();

 

댓글 남기기