UtilSharpDXTakeScreenshot(Boolean) Method
Capture the screen output using the default graphics card adapter.
This DirectX based methodology is useful to take screenshot of games that are running in full screen.
However, using this methodology for other common desktop screen captures will produce unexpected results (such as wrong colors);
so for common screenshots you should use the methods exposed in
UtilImage instead.
Namespace: DevCase.ThirdParty.SharpDXAssembly: DevCase.net48.ThirdParty.SharpDX (in DevCase.net48.ThirdParty.SharpDX.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
public static Image TakeScreenshot(
bool includeMouse
)
Public Shared Function TakeScreenshot (
includeMouse As Boolean
) As Image
Dim includeMouse As Boolean
Dim returnValue As Image
returnValue = UtilSharpDX.TakeScreenshot(includeMouse)
public:
static Image^ TakeScreenshot(
bool includeMouse
)
static member TakeScreenshot :
includeMouse : bool -> Image
No code example is currently available or this language may not be supported.
- includeMouse Boolean
-
If set to , the mouse is drawn in the resulting image.
Image
The resulting
Image.
Note: Some functionalities of this assembly may require to install one or all of the listed NuGet packages:
SharpDX
This is a code example.
No code example is currently available or this language may not be supported.
Dim jpgCodec As ImageCodecInfo =
(From codec As ImageCodecInfo In ImageCodecInfo.GetImageEncoders
Where codec.FormatID = ImageFormat.Jpeg.Guid).Single()
Dim encoderParams As New EncoderParameters(1)
Dim qualityEncoder As Imaging.Encoder = Imaging.Encoder.Quality
Dim qualityParameter As New EncoderParameter(qualityEncoder, 80)
encoderParams.Param(0) = qualityParameter
Dim screenshot As Image = TakeScreenshot(includeMouse:=True)
screenShot.Save("C:\Screenshot.jpg", jpgCodec, encoderParams)
Process.Start("C:\Screenshot.jpg")
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.