Ejemplo n.º 1
0
        public AreaSelectForm(AreaSelectFormTooltip asft, Actions actions)
        {
            this.asft    = asft;
            this.actions = actions;

            InitializeComponent();
            WindowState      = FormWindowState.Minimized;
            asft.WindowState = FormWindowState.Minimized;
            Rectangle bounds = Screen.PrimaryScreen.Bounds;

            using (Bitmap bitmap = new Bitmap(bounds.Width, bounds.Height))
                using (Graphics g = Graphics.FromImage(bitmap))
                {
                    g.CopyFromScreen(new Point(bounds.Left, bounds.Top), Point.Empty, bounds.Size);


                    bgimage = new Bitmap(bitmap);
                    this.pictureBox1.Image = bgimage;
                    WindowState            = FormWindowState.Maximized;
                    asft.WindowState       = FormWindowState.Normal;
                }
            Paint += new PaintEventHandler(AreaSelectForm_Paint);

            pictureBox1.Paint += new PaintEventHandler(pictureBox1_Paint);

            RetTeszt = "keksz";
        }
Ejemplo n.º 2
0
 private void button2_Click(object sender, EventArgs e)
 {
     asft             = new AreaSelectFormTooltip();
     asf              = new AreaSelectForm(asft, actions);
     asf.FormClosing += asf_FormClosedEvent; //(a, b) => { };
     asf.Show();
     asft.Show();
 }