Set the StartPosition
of the form to Manual
and then set (in designer), then on load (this.Load += new System.EventHandler(this.Form_Load);
) set this.Left
and this.Top
to requested values. (Left = 0
for primary screen left side, Top
value calculate from screen resolution, window size (this.Size
))
Sample code (your code):
private void Form_Load(object sender, EventArgs e)
{
Rectangle workingArea = Screen.PrimaryScreen.WorkingArea;
// use 'Screen.AllScreens[1].WorkingArea' for secondary screen
this.Left = workingArea.Left + workingArea.Width - this.Size.Width;
this.Top = workingArea.Top + workingArea.Height - this.Size.Height;
}
(from designer; Form.Designer.cs)
this.StartPosition = System.Windows.Forms.FormStartPosition.Manual;
this.Text = "Form title";
this.Load += new System.EventHandler(this.Form_Load);