代码之家  ›  专栏  ›  技术社区  ›  Patrick

C#后台应用程序截图不完整

  •  0
  • Patrick  · 技术社区  · 4 年前

    我一直在尝试重复使用这两个答案中的代码。

    Get a screenshot of a specific application 和 Capture screen of Window by handle

    在这两种情况下,我都会出现奇怪的错误:

    1. 屏幕截图大约占目标窗口的33%。
    2. 屏幕截图缺少图像的主体。

    Here is an example of the incomplete screenshot

    我可以很容易地通过更改来调整尺寸 Bitmap bmp = new(rc.Width, rc.Height, PixelFormat.Format32bppArgb); 到 Bitmap bmp = new(rc.Width * 3, rc.Height * 3, PixelFormat.Format32bppArgb);

    然而,我无法让程序的主体出现。

    有人知道这些有用的帖子发布后发生了什么变化吗?为什么代码只能部分工作?

    0 回复  |  直到 4 年前
    推荐文章