This sample demonstrates how to use Windows.Graphics.Capture APIs for displays and windows in a WPF app. It also shows how to launch the system picker, which can manage window enumeration and capture selection for you.
NOTE: Minimized windows are enumerated but not captured.
- Visual Studio 2017 or later - Get a free copy of Visual Studio
- .NET Framework 4.7.2 or later
- Windows 10 version 1903 or later
- Windows 10 SDK 18362 or later - Get the SDK
This sample uses new APIs available in Windows 10 version 1903, SDK 18362:
CreateForWindow
(HWND) andCreateForMonitor
(HMON) APIs are in the Windows.Graphics.Capture.Interop.h header.
API reference: Windows.Graphics.Capture Namespace