private void addppic_Click(object sender, EventArgs e) { newproperty np = new newproperty(this); np.TopLevel = false; cntpnl.Controls.Clear(); cntpnl.Controls.Add(np); np.formlbl.Visible = true; np.Show(); }
private void addpbtn_Click(object sender, EventArgs e) { dialogcontainer dg = new dialogcontainer(); newproperty np = new newproperty(dg); np.TopLevel = false; dg.dialogpnl.Controls.Clear(); dg.dialogpnl.Controls.Add(np); dg.Size = new Size(1206, 734); dg.lbl.Text = "Add New Property"; np.dpnl.Location = new Point(4, 5); dg.Show(); np.Show(); }