private void btnlogout_Click_3(object sender, EventArgs e) { phome.Visible = false; lblmsg.Text = ""; Microsoft.Win32.Registry.CurrentUser.DeleteSubKey("MyRegKey"); lblchanges.Text = ""; Addmain admin = new Addmain(); this.Close(); }
private void loginToolStripMenuItem_Click(object sender, EventArgs e) { try { Addmain ad = new Addmain(); ad.MdiParent = this; ad.Show(); } catch (Exception ex) { MessageBox.Show(ex.Message); } }