I want to place a button in the lower right hand corner of my Windows Form, and i want my form to be maximized. How should i go about this? Currently my code looks like this:
But for some reason the button is placed somewhere in the upper left hand quarter of the window? It seems like even tho' i maximize the window the size attributes (like Width) doesnt change, and i dont even know what these are, as i havnt set them explicitly. Any suggestions?
Code:
public MyForm()
{
this.WindowState = FormWindowState.Maximized;
<initialize button 'myButton'>
this.myButton.Location = new System.Drawing.Point(this.Width - 150, this.Height - 150);
}
But for some reason the button is placed somewhere in the upper left hand quarter of the window? It seems like even tho' i maximize the window the size attributes (like Width) doesnt change, and i dont even know what these are, as i havnt set them explicitly. Any suggestions?