Table of Contents

Enum Win32ScreencapMethods

Namespace
MaaFramework.Binding
Assembly
MaaFramework.Binding.dll
Win32 screencap method flags

Use bitwise OR to set the methods you need.
MaaFramework will test all provided methods and use the fastest available one.

No default value. Client should choose one as default.

Predefined combinations:
- Foreground: DXGI_DesktopDup_Window | ScreenDC
- Background: FramePool | PrintWindow

Different applications use different rendering methods, there is no universal solution.

| Method                  | Speed     | Compatibility | Require Admin | Background Support | Notes                            |
    |-------------------------|-----------|---------------|---------------|--------------------|----------------------------------|
    | GDI                     | Fast      | Medium        | No            | No                 |                                  |
    | FramePool               | Very Fast | Medium        | No            | Yes                | Requires Windows 10 1903+        |
    | DXGI_DesktopDup         | Very Fast | Low           | No            | No                 | Desktop duplication (full screen)|
    | DXGI_DesktopDup_Window  | Very Fast | Low           | No            | No                 | Desktop duplication then crop    |
    | PrintWindow             | Medium    | Medium        | No            | Yes                |                                  |
    | ScreenDC                | Fast      | High          | No            | No                 |                                  |

Note: FramePool and PrintWindow support pseudo-minimize — when the target window
is minimized, they make it transparent and click-through, then restore it without
activation, allowing screencap to continue without disturbing the user.
Other screencap methods will fail when the target window is minimized.

[Flags]
public enum Win32ScreencapMethods : ulong

Fields

All = 18446744073709551615
Background = 18
DXGI_DesktopDup = 4
DXGI_DesktopDup_Window = 8
Foreground = 40
FramePool = 2
GDI = 1
None = 0
PrintWindow = 16
ScreenDC = 32