Monday, April 28, 2008

Set window location to right bottom of the screen

Set window position/location.
By default framework will draw the new window at center of the screen/parent window.

If you want to draw it at your desired location, set the location property of window

before showing (in load event or before load event).
If you want to show it to right bottom of screen use below code.

this.Location = new Point(Screen.PrimaryScreen.WorkingArea.Width - this.Width,

Screen.PrimaryScreen.WorkingArea.Height - this.Height);