MDI窗体

public partial class MySchool : Form
    {
        public MySchool()
        {
            InitializeComponent();
        }

        private void tsmiAddUser_Click(object sender, EventArgs e)
        {
            AddStudentForm addStudentForm = new AddStudentForm();//创建子窗体
            addStudentForm.MdiParent = this;//设置子窗体的MDI父窗体
            addStudentForm.Show();
        }

        private void tsmiSearchUser_Click(object sender, EventArgs e)
        {
            SearchStudentForm searchStudentForm = new SearchStudentForm();
            searchStudentForm.MdiParent = this;
            searchStudentForm.Show();
        }

        private void tsbAddUser_Click(object sender, EventArgs e)
        {
            AddStudentForm addStudentForm = new AddStudentForm();//创建子窗体
            addStudentForm.MdiParent = this;//设置子窗体的MDI父窗体
            addStudentForm.Show();
        }

        private void MySchool_Load(object sender, EventArgs e)
        {
            this.tsslStatus.Text = "当前登录的用户:"+Helper.account;
        }

        private void tsmiAbout_Click(object sender, EventArgs e)
        {
            ImageForm imageForm = new ImageForm();
            imageForm.ShowDialog();//打开模式窗体
        }
    }

posted @ 2014-07-27 17:32  单方面  阅读(317)  评论(0编辑  收藏  举报