private void swichPanelForm(string btnClicked)
        {
            Form[] formArray = new Form[6];
            formArray[0] = new frmDashboard();
            formArray[1] = new frmProject();
            formArray[2] = new frmTimeSheet();
            formArray[3] = new frmStaffMembers();
            formArray[4] = new frmExpenses();
            formArray[5] = new frmReports();


            for (int i = 0; i < formArray.Length; i++)
            {
                if (formArray[i].Name == btnClicked)
                {
                    formArray[i].MdiParent = this;
                    formArray[i].Dock      = DockStyle.Fill;


                    formsPanel.Controls.Clear();
                    FormProject.TopLevel = false;
                    formsPanel.Controls.Add(formArray[i]);
                    formArray[i].Show();
                }
            }
        }
        public frmProject()
        {
            InitializeComponent();

            this.formDashboard = new frmDashboard();
            //form2.Show();
            formDashboard.Hide();
        }
        private void btnDashboard_Click(object sender, EventArgs e)
        {
            if (formDashboard == null)
            {
                formDashboard = new frmDashboard();   //Create form if not created
                //formDashboard.FormClosed += formDashboard_FormClosed;  //Add eventhandler to cleanup after form closes
            }

            formDashboard.Show(this);  //Show Form assigning this form as the forms owner
            Hide();
        }