Commit 3b0e296b HZH

修改关闭按钮位置

1 个父辈 083a6d02
...@@ -106,6 +106,7 @@ namespace HZH_Controls.Forms ...@@ -106,6 +106,7 @@ namespace HZH_Controls.Forms
this.ShowInTaskbar = false; this.ShowInTaskbar = false;
this.Text = "FrmWithTitle"; this.Text = "FrmWithTitle";
this.Shown += new System.EventHandler(this.FrmWithTitle_Shown); this.Shown += new System.EventHandler(this.FrmWithTitle_Shown);
this.SizeChanged += new System.EventHandler(this.FrmWithTitle_SizeChanged);
this.VisibleChanged += new System.EventHandler(this.FrmWithTitle_VisibleChanged); this.VisibleChanged += new System.EventHandler(this.FrmWithTitle_VisibleChanged);
this.ResumeLayout(false); this.ResumeLayout(false);
......
...@@ -113,5 +113,10 @@ namespace HZH_Controls.Forms ...@@ -113,5 +113,10 @@ namespace HZH_Controls.Forms
{ {
this.Close(); this.Close();
} }
private void FrmWithTitle_SizeChanged(object sender, EventArgs e)
{
btnClose.Location = new Point(this.Width - btnClose.Width, btnClose.Location.Y);
}
} }
} }
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!