Chào các bạn! Vì nhiều lý do từ nay Truyen2U chính thức đổi tên là Truyen247.Pro. Mong các bạn tiếp tục ủng hộ truy cập tên miền mới này nhé! Mãi yêu... ♥

visual midi

using System;

using System.Collections.Generic;

using System.ComponentModel;

using System.Data;

using System.Drawing;

using System.Linq;

using System.Text;

using System.Windows.Forms;

namespace WindowsFormsApplication1

{

    public partial class MDIForm : Form

    {

        private int childFormNumber = 0;

        public MDIForm()

        {

            InitializeComponent();

        }

        private void câuHỏiToolStripMenuItem_Click(object sender, EventArgs e)

        {

            if (tienich.trangthai==true)

            {

                foreach (Form childForm in MdiChildren)

                {

                    childForm.Close();

                }

                Form1 frm = new Form1();

                frm.MdiParent = this;

                frm.Text = "Câu hỏi";

                frm.Show();

            }

            else

            {

                MessageBox.Show("Bạn chưa đăng nhập tài khoản");

            }

        }

        private void thoátToolStripMenuItem_Click(object sender, EventArgs e)

        {

            Application.Exit();

        }

        private void khởiĐộngLạiToolStripMenuItem_Click(object sender, EventArgs e)

        {

            Application.Restart();

        }

        private void đăngNhậpToolStripMenuItem_Click(object sender, EventArgs e)

        {

            foreach (Form childForm in MdiChildren)

            {

                childForm.Close();

            }

            DangNhap childForm1 = new DangNhap();

            childForm1.MdiParent = this;

            childForm1.Text = "";

            childForm1.Show();

            //if (tienich.trangthai==true)

            //{

            //    menuStrip1.Items["danhMụcToolStripMenuItem"].Enabled = true;

            //    menuStrip1.Items["trộnĐềThiToolStripMenuItem"].Enabled = true;    

            //}

        }

        private void nhómKiếnThứcToolStripMenuItem_Click(object sender, EventArgs e)

        {

            foreach (Form childForm in MdiChildren)

            {

                childForm.Close();

            }

            Form1 frm = new Form1();

            frm.MdiParent = this;

            frm.Text = "Nhóm kiến thức";

            frm.Show();

        }

    }

}

Bạn đang đọc truyện trên: Truyen247.Pro

Tags: