コード例 #1
0
        private void logoutToolStripMenuItem1_Click(object sender, EventArgs e)
        {
            admin_panel ap = new admin_panel();

            this.Hide();
            ap.ShowDialog();
            this.Close();
        }
コード例 #2
0
        private void logoutToolStripMenuItem_Click(object sender, EventArgs e)
        {
            DialogResult d;

            d = MessageBox.Show("Are you sure", "Exit", MessageBoxButtons.YesNo, MessageBoxIcon.Information);
            if (d == DialogResult.Yes)
            {
                admin_panel ap = new admin_panel();
                this.Hide();
                ap.ShowDialog();
                this.Close();
            }
            //admin_panel ap = new admin_panel();
            //ap.Show();
            //this.Hide();
        }