示例#1
0
        private void NewFormDown(object sender, KeyEventArgs e)
        {
            DialogResult dr = MessageBox.Show("是否打开新窗口?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Information);

            if (dr == DialogResult.Yes)
            {
                NewForm newForm = new NewForm();
                newForm.Show();
            }
            else
            {
                this.Close();
            }
        }
示例#2
0
        private void MainMouseClick(object sender, MouseEventArgs e)
        {
            NewForm newForm = new NewForm();

            newForm.Show();
        }