Does anyone know how to maximize a form from another form, in c#?
I tried the code below but it won’t work:
Form1 form1 = new Form1();
form1.WindowState = FormWindowState.Maximized;
Any ideas?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Well two possible problems, either you don’t get any form at all, then the solution is to Show the form.
But I guess that you already have a form1 loaded somewhere, then you can not use
because then you creates a new form that you don’t display, remove this line and find a way to pass a reference to
form1from where it was originally created to the method where the above code is located.