tags:

views:

223

answers:

3

Hi,

how can I place a WinForm (C#) at the bottom-right of the screen when it pop-up?

thanks

Lennie

A: 

In you form constructor put the following code:

StartPosition = FormStartPosition.Manual;

This will set the start position of the form to whatever you set as the value for the form's location (you can set this in the form designer).

flayto
Problem with this is that everybody use different size screens, it might look fine on yours but it not to say it will on a customers...
+1 - Yeah, I guess you'd need that one as well, to make the form use the location you specify.
Noam Gal
+3  A: 

try something on the lines of

Rectangle workingArea = Screen.GetWorkingArea(this);
this.Location = new Point(workingArea.Right - Size.Width, 
                          workingArea.Bottom - Size.Height);

Hope it works well for you.

Noam Gal
Excellent. Thank you for this, I wish I could accept this as the answer :p
baeltazor
+1  A: 
Form2 a = new Form2();
a.StartPosition = FormStartPosition.Manual;
a.Location = new Point(Screen.PrimaryScreen.WorkingArea.Width - a.Width, 
                       Screen.PrimaryScreen.WorkingArea.Height - a.Height);
adatapost