我想创建一个旨在为通用 Windows 构建的 ScreenCaptureLib.dll。
我们已经有了以下使用 Windows.Forms 的东西: https://github.com/ShareX/ShareX/tree/master/ShareX.ScreenCaptureLib
显然没有任何 Windows 窗体代码不起作用,我希望获得一些正确方向的指示以开始。
最佳答案
可以关注官方文档Record the screen with ScreenCapture , 但请注意:
The ScreenCapture API is only available on mobile devices.
目前还没有可直接用于从 UWP 应用捕获桌面屏幕的 API。但是,作为变通方法,我们可以将 XAML 树渲染为位图,为此,请参阅 Capturing Snapshot in Windows 8.1 Store App .
您还可以通过 Windows 反馈工具提交请求以添加此新功能以进行开发。
更新:
The ScreenCapture feature is only supported for mobile devices running Windows Phone 8.1. This API is not supported on Windows 10.
关于c# - 通用Windows库(UWP)截屏方式?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35589563/