Пример #1
0
        private void MainForm_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.P && Control.ModifierKeys == Keys.Control)
            {
                frm_PurchaseForm _form = new frm_PurchaseForm();
                this.IsMdiContainer = true;
                //_form.TopLevel = false;
                //panel2.Controls.Add(_form);
                //_form.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
                //panel2.Height = _form.Height;
                //panel2.Width = _form.Width;
                _form.Dock = DockStyle.Fill;
                _form.ShowDialog();
            }

            if (e.KeyCode == Keys.S && Control.ModifierKeys == Keys.Control)
            {
                frm_SaleForm _form = new frm_SaleForm();
                this.IsMdiContainer = true;
                //_form.TopLevel = false;
                //panel2.Controls.Add(_form);
                //_form.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
                //panel2.Height = _form.Height;
                //panel2.Width = _form.Width;
                _form.Dock = DockStyle.Fill;
                _form.ShowDialog();
            }
        }
Пример #2
0
        private void supplierToolStripMenuItem_Click(object sender, EventArgs e)
        {
            frm_PurchaseForm _form = new frm_PurchaseForm();

            //_form.TopLevel = false;
            //panel2.Controls.Add(_form);
            //_form.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
            //panel2.Height = _form.Height;
            //panel2.Width = _form.Width;
            _form.Dock = DockStyle.Fill;
            _form.ShowDialog();
        }