Amogh
Amogh

Reputation: 4573

Prevent screen capturing softwares to capture an application screen

I am working on examination system, as a security part of the system I don't want anyone should leak the paper by screen recording or by giving remote using so many free applications for desktop sharing.

First I searched for can I block such applications? But I don't think so, as there so many ways to record/share a screen. Then I got to know about HDCP but I guess it will only application to videos and not to HTML (correct me if I am wrong). SO I want something like HDCP or VLC player's "directx video output" so that content doesn't get captured by printscreen or other screen capture techniques.

I guess D3D9/DDraw overlays are only for video content can I use this for HTML content/in a c# based windows application?

Upvotes: 4

Views: 4306

Answers (1)

Amogh
Amogh

Reputation: 4573

I have achieved this by using SetWindowDisplayAffinity, as per MSDN

The display affinity setting. This setting specifies where the window's contents are can be displayed. Set this value to WDA_MONITOR to display the window's contents only on a monitor. Set this value to WDA_NONE to remove the monitor-only affinity.

So setting WDA_MONITOR to handle of WinForm makes it black when print screen or desktop recording or in desktop sharing application.

Image captured through mobile:

enter image description here

However, I am open for any other (better) answer for this.

Upvotes: 7

Related Questions