Пример #1
0
        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();
        }
Пример #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();
        }