示例#1
0
        private void Home_Click(object sender, EventArgs e)
        {
            frmVisitorList frm = new frmVisitorList();

            frm.StartPosition = FormStartPosition.CenterScreen;
            frm.WindowState   = FormWindowState.Maximized;
            frm.MdiParent     = this;
            frm.Show();
        }
示例#2
0
        private void FrmMain_Load(object sender, EventArgs e)
        {
            toolStripStatusLabel2.Text = User;
            //============ เปลี่ยนสี MDI form ===============
            foreach (Control ctrl in this.Controls)
            {
                if (ctrl is MdiClient)
                {
                    ctrl.BackColor = Color.Gainsboro;
                }
            }
            //============================================

            frmVisitorList frm = new frmVisitorList();

            frm.StartPosition = FormStartPosition.CenterScreen;
            frm.WindowState   = FormWindowState.Maximized;
            frm.MdiParent     = this;
            frm.Show();
        }