ScreenSnapper.SnapAPicture C# (CSharp) Method

SnapAPicture() public method

public SnapAPicture ( Rectangle rect ) : GDIDIBSection
rect Rectangle
return GDIDIBSection
        public GDIDIBSection SnapAPicture(Rectangle rect)
        {
            GDIDIBSection contextImage = new GDIDIBSection(rect.Width, rect.Height, BitCount.Bits24);

            contextImage.DeviceContext.BitBlt(fContext, new Point(rect.X, rect.Y), new Rectangle(0, 0, rect.Width, rect.Height),
                (TernaryRasterOps.SRCCOPY | TernaryRasterOps.CAPTUREBLT));


            return contextImage;
        }
    }