Example #1
0
        private void 借还机ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            Form userBorrowInfoForm = new UserBorrowInfoForm();

            for (int x = 0; x < MdiChildren.Length; x++)
            {
                Form tempChild = (Form)MdiChildren[x];
                tempChild.Close();
            }

            userBorrowInfoForm.MdiParent   = this;
            userBorrowInfoForm.WindowState = FormWindowState.Maximized;
            userBorrowInfoForm.Show();
        }
Example #2
0
        //[DllImport("user32")]
        //public static extern int SetParent(int hWndChild, int hWndNewParent);



        private void UserForm_Load(object sender, EventArgs e)
        {
            this.IsMdiContainer = true;

            this.Text     = LoginForm.usrName + "---欢迎使用样机管理系统";
            slblTime.Text = slblTime.Text + DateTime.Now.ToString();

            this.Width  = Fuctions.winFormWidth;
            this.Height = Fuctions.winFormHeight;


            Form userBorrowInfo = new UserBorrowInfoForm();

            userBorrowInfo.MdiParent   = this;
            userBorrowInfo.WindowState = FormWindowState.Maximized;
            userBorrowInfo.Show();
        }