public static Form LoadAddTenentForm() { AddTenant add = new AddTenant(); add.BringToFront(); add.TopLevel = false; add.Visible = true; add.FormBorderStyle = FormBorderStyle.None; add.Dock = DockStyle.Fill; return add; }
private void addANewTenantToolStripMenuItem_Click(object sender, EventArgs e) { AddTenant tenant = new AddTenant(); tenant.BringToFront(); tenant.TopLevel = false; tenant.Visible = true; tenant.FormBorderStyle = FormBorderStyle.None; tenant.Dock = DockStyle.Fill; panel1.Controls.Add(tenant); tenant.Show(); DGVTenants.Hide(); }