WPF - Graphics.CopyFromScreen returns a black image

后端 未结 2 1932
长发绾君心
长发绾君心 2021-02-08 14:32

The following method is taken from a WinForms app. It simply captures the screen, but I needed to modify it to work in a WPF application. When I use it, it returns a black image

2条回答
  •  滥情空心
    2021-02-08 15:15

    I believe you need to use Interop and the BitBlt method. This blog explains how this is done, and a follow-on post that shows how to get window borders.

提交回复
热议问题