先建立一个子窗口,然后调用它,让它一直运行在MDI中:
log = new Frm_Log();
log.MdiParent = this;
log.StartPosition = FormStartPosition.CenterParent;
log.ControlBox = false;
log.Show();
log.FormBorderStyle = FormBorderStyle.None;
log.Size=new Size(ClientSize.Width/2,ClientSize.Height/2);
//log.Size = ClientSize.Height-10;
log.Location = new Point((this.Width) / 4, (this.ClientSize.Height) / 4);
重绘时:
private void SMS_HOME_Resize(object sender, EventArgs e)
{
log.Size = new Size(ClientSize.Width / 2, ClientSize.Height / 2);
//log.Size = ClientSize.Height-10;
log.Location = new Point((this.Width) / 4, (this.ClientSize.Height) / 4);
}
MDI parent window control blocks of all child windows
Guess you like
Origin blog.csdn.net/chscomfaner/article/details/82803969
Recommended
Ranking