private void Form_Main_Load(object sender, EventArgs e) { setadmin(); User_Control.UC_Dashboard um = new User_Control.UC_Dashboard(); mainpanel.Controls.Clear(); mainpanel.Controls.Add(um); }
private void backToDashboardToolStripMenuItem_Click(object sender, EventArgs e) { User_Control.UC_Dashboard uc = new User_Control.UC_Dashboard(); mainpanel.Controls.Clear(); mainpanel.Controls.Add(uc); removecolors(); backToDashboardToolStripMenuItem.BackColor = System.Drawing.Color.Cyan; }