private void btnClose_Click(object sender, EventArgs e) { if (MessageFrm.ShowDialog("Exit Program ?") == DialogResult.OK) { this.Close(); } }
public static DialogResult ShowDialog(string pMsg) { MessageFrm frm = new MessageFrm(pMsg); return(frm.ShowDialog()); }