private void button3_Click(object sender, EventArgs e) { Form frmMsg = new Form(); frmMsg.StartPosition = FormStartPosition.Manual; frmMsg.Location = new Point(Screen.PrimaryScreen.WorkingArea.Width - frmMsg.Width, Screen.PrimaryScreen.WorkingArea.Height - frmMsg.Height); frmMsg.Show(); }
有几种方法的。 一是设置Form的location属性。 Form 还有个方便的属性,StartPoint可以用来设置Form的特殊位置。
FormMag f= new FormMag(); f.Size = new Size(200, 100); int X = Screen.PrimaryScreen.Bounds.Width - f.Size.Width; int Y = SystemInformation.WorkingArea.Height - f.Size.Height; f.StartPosition = FormStartPosition.Manual; f.Location = new Point(X, Y);
{
Form frmMsg = new Form();
frmMsg.StartPosition = FormStartPosition.Manual;
frmMsg.Location = new Point(Screen.PrimaryScreen.WorkingArea.Width - frmMsg.Width, Screen.PrimaryScreen.WorkingArea.Height - frmMsg.Height);
frmMsg.Show();
}
Form 还有个方便的属性,StartPoint可以用来设置Form的特殊位置。
f.Size = new Size(200, 100);
int X = Screen.PrimaryScreen.Bounds.Width - f.Size.Width;
int Y = SystemInformation.WorkingArea.Height - f.Size.Height;
f.StartPosition = FormStartPosition.Manual;
f.Location = new Point(X, Y);