private void btnInvigilation_Click(object sender, EventArgs e) { //replace the elements from Candidates user controler this.pnlFunctionViewr.Controls.Clear(); var Invigiation = new Examinations_Home(); this.pnlFunctionViewr.Controls.Add(Invigiation); //change the background color ClearButtonBackground(); btnExaminations.ForeColor = Color.White; btnExaminations.BackColor = Color.Orange; }