Exemplo n.º 1
0
        protected ScreenShot()
        {
            Rectangle bounds = Screen.PrimaryScreen.Bounds;

            _captureBitmap = new Bitmap(bounds.Width, bounds.Height, PixelFormat.Format24bppRgb);

            using (Graphics captureGraphics = Graphics.FromImage(_captureBitmap))
            {
                captureGraphics.CopyFromScreen(bounds.Location, new Point(0, 0), bounds.Size);
            }

            _screenWindow = ScreenShotWindow.ScreenWindow;
            _screenWindow.CullObscuredAncestors();
        }