Form Alignment

  • Thread starter Thread starter Felbrigg
  • Start date Start date
Felbrigg,

In order to do this, you will have to set the Location property on the
form to coordinates that will align it with the bottom right of the screen.
You should be able to use the static Bounds property of the Screen class to
find the bounds of the screen, and then just subtract the width and height
of the form from the width and height of the screen, and you should have the
coordinates of where to place your form.

If you want to take into account the taskbar, etc, etc, then use the
static WorkingArea property on the Screen class, and perform the same calcs.

Hope this helps.
 
Thanks for your time and the advice, its really appreciated.



this.Top = System.Windows.Forms.Screen.PrimaryScreen.Bounds.Height -
this.Height;

this.Left = System.Windows.Forms.Screen.PrimaryScreen.Bounds.Width -
this.Width;
 
Back
Top