My project contains eight forms(like From1,form2,form3,form4---------form8).In My project i am using Menustrip Control.,If I open a form to hide the remaining forms.
Pls send code to solve the problem.
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Vikram AgrawalPosted Jan 13, 2015, 7:29 AM
Hiding the form is not good practice b'coz user will not able to use that form but that form will be present in memory. So instead of Hiding the form you can minimize them.
i.e.
private void MinimizeAll()
{
Form1.WindowState = FormWindowState.Minimized;
Form2.WindowState = FormWindowState.Minimized;
... ...
... ...
... ...
... ...
... ...
Form8.WindowState = FormWindowState.Minimized;
}
Call this method in menuStripClick event
MinimizeAll();
Manish Kumar ChoudharyPosted Jan 13, 2015, 6:41 AM
Hi panaklareddy ch,
you can do like this
public void HideForm()
{
From1.Hide();
From2.Hide();
From3.Hide();
From4.Hide();
From5.Hide();
From6.Hide();
From7.Hide();
Fromv.Hide();
}
call this method before menu strip click. after that whatever form you want to show
that's it.