private void button1_Click(object sender, EventArgs e) { mainPanel2.Controls.Clear(); Kandidat kd = new Kandidat(); kd.TopLevel = false; kd.AutoScroll = true; mainPanel2.Controls.Add(kd); kd.Show(); }
private void btnLogin_Click(object sender, EventArgs e) { bool status = dologin(txtUname.Text, txtPass.Text); if (status != true) { label6.Text = "Invalid username or password!"; label6.Visible = true; } else { Kandidat kd = new Kandidat(); kd.Show(); this.Hide(); } }