Beispiel #1
0
        private void button2_Click(object sender, EventArgs e)
        {
            this.Hide();
            LockForm frmLock = new LockForm();

            frmLock.Show();
        }
Beispiel #2
0
        private void LockSystemToolStripMenuItem1(object sender, EventArgs e)
        {
            this.Hide();
            LockForm lockFrm = new LockForm();

            lockFrm.ShowDialog();
            this.Close();
        }
Beispiel #3
0
        private void button2_Click(object sender, EventArgs e)
        {
            foreach (Form ChildForm in this.MdiChildren)
            {
                ChildForm.Close();
            }

            if (MessageBox.Show("Are you sure you want to lock the system? \nThe system will lock for a period of 15 minutes before it returns to the login form", "Logout", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == System.Windows.Forms.DialogResult.Yes)
            {
                this.Hide();
                LockForm frmLock = new LockForm();
                frmLock.ShowDialog();
                this.Close();
            }
            else
            {
                return;
            }
        }