Well, there are two possible problems: either you are not getting any form, then the solution should show the form.
Form1 form1 = new Form1();
form1.WindowState = FormWindowState.Maximized;
form1.Show();
But I assume that you already have form1 loaded somewhere, then you cannot use
Form1 form1 = new Form1();
because then you create a new form that you don’t see, delete this line and find a way to pass a link to form1where it was originally created for the method in which the above code is located.
source
share