示例#1
0
    public override void Start(int delay, int left, int top, int width, int height, double scale, ProjectInfo project)
    {
        base.Start(delay, left, top, width, height, scale, project);

        #region Pointers

        //http://winprog.org/tutorial/bitmaps.html
        //_desktopWindow = User32.GetDesktopWindow();
        WindowDeviceContext     = User32.GetWindowDC(_desktopWindow);
        CompatibleDeviceContext = Gdi32.CreateCompatibleDC(WindowDeviceContext);
        CompatibleBitmap        = Gdi32.CreateCompatibleBitmap(WindowDeviceContext, Width, Height);
        _oldBitmap = Gdi32.SelectObject(CompatibleDeviceContext, CompatibleBitmap);

        #endregion

        var pixelOp = CopyPixelOperations.SourceCopy;

        //If not in a remote desktop connection or if the improvement was disabled, capture layered windows too.
        if (!System.Windows.Forms.SystemInformation.TerminalServerSession || !UserSettings.All.RemoteImprovement)
        {
            pixelOp |= CopyPixelOperations.CaptureBlt;
        }

        PixelOperations = pixelOp;
    }
示例#2
0
 public static extern bool StretchBlt([In] IntPtr hdc, int nXDest, int nYDest, int nWidthDest, int nHeightDest, [In] IntPtr hdcSrc, int nXSrc, int nYSrc, int nWidthSource, int nHeightSource, CopyPixelOperations dwRop);
示例#3
0
 public static extern bool BitBlt([In] IntPtr hdc, int nXDest, int nYDest, int nWidth, int nHeight, [In] IntPtr hdcSrc, int nXSrc, int nYSrc, CopyPixelOperations dwRop);