예제 #1
0
        private void FullScreenCapture_Click(object sender, EventArgs e)
        {
            Visible = false;
            Thread.Sleep(200);
            Thread.Sleep(CaptureDelay);
            CaptureSize = new Size(Screen.PrimaryScreen.Bounds.Width, Screen.PrimaryScreen.Bounds.Height);
            Bitmap   ScreenBitmap   = new Bitmap(Screen.PrimaryScreen.Bounds.Width, Screen.PrimaryScreen.Bounds.Height);
            Graphics ScreenGraphics = Graphics.FromImage(ScreenBitmap);

            ScreenGraphics.CopyFromScreen(0, 0, 0, 0, CaptureSize);
            Image ScreenImage = ScreenBitmap as Image;

            if (CopyClipBoard)
            {
                Clipboard.SetImage(ScreenImage);
            }
            Visible = true;
            ShowFullScreenCapture ShowFullScreenCaptureForm = new ShowFullScreenCapture(ScreenImage, CheckSave);

            ShowFullScreenCaptureForm.ShowDialog();
        }
예제 #2
0
        private void SelectionCapture_Click(object sender, EventArgs e)
        {
            Thread.Sleep(200);
            Thread.Sleep(CaptureDelay);
            SelectionCapture SelectionCaptureForm = new SelectionCapture(ScreenOverlay);

            SelectionCaptureForm.Owner = this;
            if (SelectionCaptureForm.ShowDialog() == DialogResult.OK)
            {
                Bitmap   ScreenBitmap   = new Bitmap(CaptureSize.Width, CaptureSize.Height);
                Graphics ScreenGraphics = Graphics.FromImage(ScreenBitmap);
                ScreenGraphics.CopyFromScreen(SelectionCapturePos.X, SelectionCapturePos.Y, 0, 0, CaptureSize);
                Image ScreenImage = ScreenBitmap as Image;
                if (CopyClipBoard)
                {
                    Clipboard.SetImage(ScreenImage);
                }
                Visible = true;
                ShowFullScreenCapture ShowFullScreenCaptureForm = new ShowFullScreenCapture(ScreenImage, CheckSave);
                ShowFullScreenCaptureForm.ShowDialog();
            }
        }