Exemple #1
0
        private void ReportDesign_Load(object sender, System.EventArgs e)
        {
            this.ParentForm.KeyPreview = true;
            this.ParentForm.Closed    += new EventHandler(ParentForm_Closed);
            this.ParentForm.KeyDown   += new KeyEventHandler(ParentForm_KeyDown);
            this.ParentForm.KeyUp     += new KeyEventHandler(ParentForm_KeyUp);

            panLeftTop.Location = new Point(0, 0);
            panLeftTop.Size     = new Size(rulerLeft.Width, rulerTop.Height);

            rulerTop.Location  = new Point(panLeftTop.Width, 0);
            rulerLeft.Location = new Point(0, rulerTop.Height);
            panDesign.Location = new Point(rulerLeft.Width, rulerTop.Height);

            panRightBottom.Location = new Point(panMain.Width - panRightBottom.Width, panMain.Height - panRightBottom.Height);

            hscrBar.Location = new Point(rulerLeft.Width, panMain.Height - hscrBar.Height);
            hscrBar.Size     = new Size(panMain.Width - rulerLeft.Width - panRightBottom.Width, hscrBar.Height);

            vscrBar.Location = new Point(panMain.Width - vscrBar.Width, rulerTop.Height);
            vscrBar.Size     = new Size(vscrBar.Width, panMain.Height - rulerTop.Height - panRightBottom.Height);
            rulerLeft.Size   = new Size(rulerLeft.Width, panMain.Height - rulerLeft.Top);


            rulerLeft.BringToFront();
            rulerTop.BringToFront();
            hscrBar.BringToFront();
            vscrBar.BringToFront();
            panLeftTop.BringToFront();
        }