Esempio n. 1
0
        private void btnCompras_Click(object sender, EventArgs e)
        {
            frmCompras frm_compras = new frmCompras();

            frm_compras.MdiParent = this;
            client.BringToFront();
            frm_compras.MdiParent       = this;
            frm_compras.ClientSize      = new System.Drawing.Size(1300, 800);
            frm_compras.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
            frm_compras.Dock            = DockStyle.Fill;
            frm_compras.Show();
        }
Esempio n. 2
0
        private void addressBookToolStripMenuItem_Click(object sender, EventArgs e)
        {
            FrmAddressBook faddress = new FrmAddressBook();

            if (IsFormOpen("FrmAddressBook"))
            {
                Application.OpenForms["FrmAddressBook"].BringToFront();
            }
            else
            {
                faddress.MdiParent = this;
                client.BringToFront();
                faddress.Show();
            }
        }
Esempio n. 3
0
        public Frame()
        {
            InitializeComponent();
            this.ResizeEnd += MdiResizeEnd;
            client          = this.Controls.OfType <MdiClient>().First();
            client.BringToFront();

            MenuFileNew.Image   = ImageFromFile("/img/file-new.png");
            MenuFileOpen.Image  = ImageFromFile("/img/file-open.png");
            MenuFileSave.Image  = ImageFromFile("/img/file-save.png");
            MenuFileClose.Image = ImageFromFile("/img/file-close.png");
            MenuFileExit.Image  = ImageFromFile("/img/file-exit.png");

            MenuEditUndo.Image = ImageFromFile("/img/edit-undo.png");
            MenuEditRedo.Image = ImageFromFile("/img/edit-redo.png");

            MenuProjectBuild.Image    = ImageFromFile("/img/project-build.png");
            MenuProjectDebug.Image    = ImageFromFile("/img/project-debug.png");
            MenuProjectSettings.Image = ImageFromFile("/img/project-settings.png");

            Form child1 = new NewProject();
            Form child2 = new NewProject();

            child1.MdiParent = this;
            child2.MdiParent = this;
            child1.Show();
            child2.Show();
        }
Esempio n. 4
0
        //protected override void WndProc(ref Message m) {
        //    const int WM_ENTERSIZEMOVE     = 0x0231;
        //    const int WM_EXITSIZEMOVE      = 0x0232;
        //    const int WM_MOVE              = 0x0003;
        //    const int WM_SIZE              = 0x0005;
        //    const int WM_SIZING            = 0x0214;
        //    const int WM_MOVING            = 0x0216;
        //    const int WM_WINDOWPOSCHANGING = 0x0046;
        //    const int WM_WINDOWPOSCHANGED  = 0x0047;
        //
        //    //if (m.Msg != WM_WINDOWPOSCHANGED) {
        //    //    base.WndProc(ref m);
        //    //}
        //
        //    base.WndProc(ref m);
        //    base.WndProc(ref m);
        //    switch (m.Msg) {
        //    case WM_SIZING:            case WM_SIZE:
        //    case WM_MOVING:            case WM_MOVE:
        //    case WM_ENTERSIZEMOVE:     case WM_EXITSIZEMOVE:
        //    case WM_WINDOWPOSCHANGING: case WM_WINDOWPOSCHANGED:
        //        client.Location = mdi_panel.Location;
        //        client.Size = mdi_panel.Size;
        //        break;
        //    }
        //}

        void MdiResizeEnd(object sender, EventArgs e)
        {
            MdiClient mc = this.Controls.OfType <MdiClient>().First();

            mc.Location = mdi_panel.Location;
            mc.Size     = mdi_panel.Size;
            mc.BringToFront();
        }
Esempio n. 5
0
 private void UpdateStyles()
 {
     // To show style changes, the non-client area must be repainted. Using the
     // control's Invalidate method does not affect the non-client area.
     // Instead use a Win32 call to signal the style has changed.
     //User32.SetWindowPos(MdiClient.Handle, IntPtr.Zero, 0, 0, 0, 0,
     //    Win32.FlagsSetWindowPos.SWP_NOACTIVATE |
     //    Win32.FlagsSetWindowPos.SWP_NOMOVE |
     //    Win32.FlagsSetWindowPos.SWP_NOSIZE |
     //    Win32.FlagsSetWindowPos.SWP_NOZORDER |
     //    Win32.FlagsSetWindowPos.SWP_NOOWNERZORDER |
     //    Win32.FlagsSetWindowPos.SWP_FRAMECHANGED);
     MdiClient.BringToFront();
 }
Esempio n. 6
0
 private void PrikaziFormu(Form childForm)
 {
     klijent.BringToFront();
     childForm.Show();
 }
Esempio n. 7
0
 //This is used to show a child form
 //Note that we have to call client.BringToFront();
 private void ShowForm(Form childForm)
 {
     client.BringToFront();    //This will make your child form shown on top.
     childForm.Show();
 }