Capture screenshot of active window?

前端 未结 11 2258
春和景丽
春和景丽 2020-11-21 23:34

I am making a screen capturing application and everything is going fine. All I need to do is capture the active window and take a screenshot of this active window. Does an

11条回答
  •  旧时难觅i
    2020-11-22 00:29

    I assume you use Graphics.CopyFromScreen to get the screenshot.

    You can use P/Invoke to GetForegroundWindow (and then get its position and size) to determine which region you need to copy from.

提交回复
热议问题