////load logout on click of logout button in menu private void logoutToolStripMenuItem_Click(object sender, EventArgs e) { HomeForm hf = new HomeForm(); hf.MdiParent = this; hf.Show(); disble(); }
private void GroceryStoreMainForm_Load(object sender, EventArgs e) { orderToolStripMenuItem.Enabled = false; logoutToolStripMenuItem.Enabled = false; registerToolStripMenuItem.Enabled = true; loginToolStripMenuItem.Enabled = true; HomeForm homeForm = new HomeForm(); homeForm.MdiParent = this; homeForm.Size = this.ClientRectangle.Size; this.WindowState = FormWindowState.Maximized; this.StartPosition = FormStartPosition.CenterScreen; homeForm.Show(); }