Beispiel #1
0
        private void bntModaless_Click(object sender, EventArgs e)
        {
            MyDlg md = new MyDlg();

            md.Owner = this;
            md.Show();
        }
Beispiel #2
0
        private void bntModal_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("Cancel");
            }
        }