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;
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top