Detect when users take screenshots of my program

前端 未结 10 1482
猫巷女王i
猫巷女王i 2020-12-09 13:38

I\'m writing a Windows application. How can I tell when a screenshot is being taken of it? I read about how to detect the hotkey being pressed, but I\'m more worried about t

10条回答
  •  无人及你
    2020-12-09 14:03

    You can (unreliably) do this by using SetWindowsHookEx.

    Here is a complete VB.NET example.

    However, there are many ways around this. A hook installed after yours will "override" your hook. Users can take pictures of their screen in many ways, as described in this thread. I'd try to consider other options for protection than this.

提交回复
热议问题