views:

71

answers:

2

So I am making a game on Visual Studio C# and I want the form to be automatically maximized to any user's computer screen when compiled? How can I do that?

+4  A: 

Set the WindowState property of your form to Maximized.

That will cause your form to be maximumized when it's opened.

Jay Riggs
In addition, the [FormBorderStyle](http://msdn.microsoft.com/en-us/library/hw8kes41.aspx) can be set to `FormBorderStyle.None` to remove the border as well, for a more *true maximized feeling, no borders added*.
Patrick
+4  A: 

You can do it using one of the following --

  1. Set the form WindowState = Maximized
  2. Get the screen resolution using following code and set the size of your forms accordingly

    int height = Screen.PrimaryScreen.Bounds.Height;

    int width = Screen.PrimaryScreen.Bounds.Width;

Ram