Esempio n. 1
0
        public ScreenShots(Bitmap bmp)
        {
            InitializeComponent();
            this.OverSave        = false;
            this.TopMost         = true;
            this.WindowState     = FormWindowState.Maximized;
            this.BackgroundImage = bmp;
            SetStyle(ControlStyles.UserPaint | ControlStyles.AllPaintingInWmPaint | ControlStyles.OptimizedDoubleBuffer | ControlStyles.ResizeRedraw | ControlStyles.SupportsTransparentBackColor, true);
            MyPanel panel = new MyPanel();

            panel.Name                  = "panel_Select";
            panel.Size                  = new Size(1, 1);
            panel.Visible               = false;
            panel.BackColor             = Color.Transparent;
            panel.Parent                = this;
            panel.BorderStyle           = BorderStyle.FixedSingle;
            panel.BackgroundImageLayout = ImageLayout.Stretch;

            MyPanel m = new MyPanel();

            m.BackColor  = System.Drawing.Color.FromArgb(((int)(((byte)(90)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))));
            m.Dock       = System.Windows.Forms.DockStyle.Fill;
            m.Location   = new System.Drawing.Point(0, 0);
            m.Name       = "panel1";
            m.Size       = new System.Drawing.Size(1007, 574);
            m.TabIndex   = 0;
            m.MouseDown += new System.Windows.Forms.MouseEventHandler(this.panel1_MouseDown);
            m.MouseMove += new System.Windows.Forms.MouseEventHandler(this.panel1_MouseMove);
            m.MouseUp   += new System.Windows.Forms.MouseEventHandler(this.panel1_MouseUp);
            m.Cursor     = Cursors.Cross;

            this.Controls.Add(panel);
            this.Controls.Add(m);
            panel.BringToFront();
            this.panel_Select = panel;
            this.panel_Meng   = m;
        }