private void btBuscarVendedor_ItemClick(object sender, EventArgs e)
        {
            if (frmBuscarVendedor == null || frmBuscarVendedor.IsDisposed)
            {
                frmBuscarVendedor = new frmBuscarVendedor();
            }

            frmBuscarVendedor.MdiParent = this;
            frmBuscarVendedor.BringToFront();
            frmBuscarVendedor.StartPosition = FormStartPosition.Manual;

            int width = this.Controls.Find("netBarControl1", true)[0].Width;

            frmBuscarVendedor.Location = new Point(width);
            frmBuscarVendedor.Show();
        }
Beispiel #2
0
        private void pbBuscarVendedor2_Click(object sender, EventArgs e)
        {
            if (frmBuscarVendedor == null || frmBuscarVendedor.IsDisposed)
            {
                frmBuscarVendedor = new frmBuscarVendedor();
            }

            //frmBuscarInmueble.Vendedor = this.Vendedor;
            frmBuscarVendedor.MdiParent = (Form)this.Parent.Parent;
            Panel p = (Panel)this.Parent.Parent.Controls.Find("pnlMdi", true).First();

            p.Controls.Add(frmBuscarVendedor);

            frmBuscarVendedor.BringToFront();
            frmBuscarVendedor.StartPosition = FormStartPosition.Manual;

            //int width = this.Controls.Find("netBarControl1", true)[0].Width;
            frmBuscarVendedor.Location = new Point(120, 0);
            this.Close();
            frmBuscarVendedor.Show();
        }