Esempio n. 1
0
        private void btnModaless_Click(object sender, EventArgs e)
        {
            MyDlg md = new MyDlg();

            md.Owner = this;
            md.Show();
        }
Esempio n. 2
0
        private void btnModal_Click(object sender, EventArgs e)
        {
            MyDlg        md      = new MyDlg();
            DialogResult dResult = md.ShowDialog();

            if (dResult == DialogResult.OK)
            {
                MessageBox.Show("OK");
            }
            else if (dResult == DialogResult.Cancel)
            {
                MessageBox.Show("Cancle");
            }
        }