You can make a static class in a new FormManager.cs file, every time you show or hide a form use this class.
Example:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace WindowsFormsApplication1
{
public class FormManager
{
static FormManager _instance = null;
private Form1 f1 = new Form1();
private Form2 f2 = new Form2();
public static FormManager Instance
{
get
{
if (_instance == null)
_instance = new FormManager();
return _instance;
}
}
public void FormOne(bool flag)
{
if (flag == true)
f1.Show();
else
f1.Hide();
}
public void FormTwo(bool flag)
{
if (flag == true)
f2.Show();
else
f2.Hide();
}
}
}
Sample code of the form
FormManager.Instance.FormOne(true);