Skip to content

How do you use MaximizedBounds in C#

Louis

Asked Dec 15, 2006, 11:15 PM EST1 answer
Share
LinkedInX
Hi

When working with a form you can set the MaximizedBounds. Can someone please give me an example where they have succesffully set the MaximizedBounds on a form???

It is most probably simple but i always get an error.

Thanks in advance

1 Answer

Know the answer? Post it. Somebody with the same question will find it here.

  • 0
    Play around with the following:

    this.Bounds = Screen.PrimaryScreen.Bounds;

    this.WindowState = FormWindowState.Maximized;

    this.ClientSize = Screen.PrimaryScreen.Bounds.Size;


    Personally, when I want to make a 'fullscreen' application, I use
    this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
    this.Bounds = Screen.PrimaryScreen.Bounds;
    this.WindowState = System.Windows.Forms.FormWindowState.Maximized;
    this.ShowInTaskbar = false;
    0