示例#1
0
        static void Main()
        {
            Application.SetHighDpiMode(HighDpiMode.SystemAware);
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            frmDangNhap frmDN = new frmDangNhap();

            if (frmDN.ShowDialog() == DialogResult.OK)
            {
                Application.Run(new frmThongTin());
            }

            //Application.Run(new frmThongTin());
            //Application.Run(new frmTheLoai());
        }
示例#2
0
        private void btnThoat_Click(object sender, EventArgs e)
        {
            DialogResult ret = MessageBox.Show(
                "Bạn muốn thoát?",
                "Hỏi",
                MessageBoxButtons.YesNo,
                MessageBoxIcon.Question);

            if (ret == DialogResult.Yes)
            {
                frmDangNhap frmDN = new frmDangNhap();
                this.Visible = false;
                if (frmDN.ShowDialog() == DialogResult.OK)
                {
                    frmThongTin frmTT = new frmThongTin();
                    frmTT.ShowDialog();
                }
            }
        }