Exemplo n.º 1
0
        private void ausschnittToolStripMenuItem_Click(object sender, EventArgs e)
        {
            this.Hide();
            Application.DoEvents();

            frmRegion fr = new frmRegion();

            if (fr.ShowDialog() == DialogResult.OK)
            {
                this.createShot(fr.Location, fr.Size);
            }
        }
Exemplo n.º 2
0
        private void actHook_KeyDown(object sender, KeyEventArgs e)
        {
            switch (e.KeyCode)
            {
            case Keys.LMenu:
                this.isAlt = true;
                break;

            case Keys.LShiftKey:
                this.isShift = true;
                break;

            case Keys.D3:
                if (isAlt && isShift)
                {
                    // create a full view screenshot
                    Size size = this._sc.DetermineScreenBounds();
                    this.createShot(new Point(0, 0), size);
                    e.Handled = true;
                }
                break;

            case Keys.D4:
                if (isAlt && isShift)
                {
                    this.Hide();
                    Application.DoEvents();

                    frmRegion fr = new frmRegion();
                    fr.FormClosed += new FormClosedEventHandler(fr_FormClosed);
                    fr.Show();
                    e.Handled = true;
                }
                break;

            case Keys.D5:
                if (isAlt && isShift)
                {
                    this._sc.SetForegroundWindow();
                    this.processScreenshot(this._sc.CreateBitmapOfForegroundWindow());
                    e.Handled = true;
                }
                break;
            }
        }