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.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Manish Kumar ChoudharyRank #339 · 7.4K reputationPosted Jan 13, 2015, 1:41 AM EST
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.
Vikram AgrawalRank #4,713 · 329 reputationPosted Jan 13, 2015, 2:29 AM EST
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();