简体   繁体   English

除了 UWP 应用程序中的一些 windows 之外,如何捕获屏幕?

[英]How to capture the screen except for some windows in UWP app?

I'm developing an screen recorder app with Media Capture API in UWP.我正在 UWP 中使用媒体捕获 API 开发屏幕录像机应用程序。 Now I'm trying to make the application able to record the screen except the windows of my application.I have heard that Magnification API can help me to do this if I develop the application in Win32 environment,but how to do this in UWP and Media Capture API?现在我正在尝试使应用程序能够记录屏幕,除了我的应用程序的 windows。我听说如果我在 Win32 环境中开发应用程序,放大 API 可以帮助我做到这一点,但是如何在 ZADD4E130E8FD270A 中做到这一点媒体捕获 API?

How to capture the screen except for some windows in UWP app?除了 UWP 应用程序中的一些 windows 之外,如何捕获屏幕?

Starting in Windows 10, version 1803 , the Windows.Graphics.Capture namespace provides APIs to acquire frames from a display or application window.从 Windows 10,版本 1803开始, Windows.Graphics.Capture命名空间提供 API 以从显示或应用程序 window 获取帧。

You could use the GraphicsCapturePicker class to invoke the system picker UI.您可以使用GraphicsCapturePicker class 来调用系统选择器 UI。 The end user uses this UI to select the display or application window of which to take screen captures.最终用户使用此 UI 对 select 显示或应用程序 window 进行屏幕截图。 The picker will return a GraphicsCaptureItem that will be used to create a GraphicsCaptureSession.选择器将返回用于创建 GraphicsCaptureSession 的 GraphicsCaptureItem。

Please refer this document that contains complete sample code.请参阅包含完整示例代码的文档

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM