private void btnHome_Click(object sender, EventArgs e) { //replace the elements from Candidates user controler this.pnlFunctionViewr.Controls.Clear(); var Home = new Home(); this.pnlFunctionViewr.Controls.Add(Home); //change the background color ClearButtonBackground(); btnHome.BackColor = Color.Orange; btnHome.ForeColor = Color.White; }
private void ShapedForm1_Load(object sender, EventArgs e) { this.lblUserName.Text = userNa; this.Region = Round.GetRoundedRegion(1024, 700); this.btnCandidates.Region = Round.GetRoundedRegion(130, 40); this.btnHome.Region = Round.GetRoundedRegion(70, 40); this.btnMini.Region = Round.GetRoundedRegion(30, 27); this.btnMcqHandling.Region = Round.GetRoundedRegion(130, 40); this.btnUserHandling.Region = Round.GetRoundedRegion(125, 40); this.btnRecognition.Region = Round.GetRoundedRegion(130, 40); this.btnExaminations.Region = Round.GetRoundedRegion(130, 40); this.btnReports.Region = Round.GetRoundedRegion(130, 40); this.btnHelp.Region = Round.GetRoundedRegion(145, 40); this.pnlBackGround.Region = Round.GetRoundedRegion(1014, 690); this.pnlHedder.Region = Round.GetRoundedRegion(1014, 98); this.pnlFunctionViewr.Controls.Clear(); var Home = new Home(); this.pnlFunctionViewr.Controls.Add(Home); ClearButtonBackground(); btnHome.BackColor = Color.Orange; }