Professional Documents
Culture Documents
GALLERY
MSDN LIBRARY
FORUMS
Ask a question
SIGN IN
Quick access
Answered by:
1,635
Points
Top 5%
Mark Duffill
Joined Oct 2008
I know this question has been asked before, but it seems like the previous questions before
were not answered completely.
Mark Duffill's th
2
Show activity
1
Sign in
to vote
I am looking for a way to protect my window from being copied. I've searched the web and it
seems like a common approach is to overwrite the default print screen hot keys. This would
work for me, but I was hoping there was a more robust approach?
does SetWindowDisplayAffinity
function prevent screen capturing?
HOW TO STOP / PREVENT
SCREEN CAPTURE VIDEO IN VB?
Programmatically Prevent Screen
Capture in Windows Phone 7.5/8
It says screen capture can be
prevented. Really?
Randomly capturing "Black" screen
I was reading through the web and I found that it is possible for third-party applications to read
the screen context themselves and copy the window (http://msdn.microsoft.com/enus/magazine/cc163713.aspx)
Is there a way to prevent this as well? I was hoping to achieve functionality similar to Windows
Media Player where if the user decides to copy the screen, the user will see a black box
around the protected content.
Thanks,
J
Sunday, March 22, 2009 8:11 PM
Reply | Quote
Jon Salepor
35 Points
Answers
https://social.msdn.microsoft.com/Forums/vstudio/en-US/9650cac8-9c83-4131-b85a-0b4d95a977ee/prevent-screen-capture?forum=vcgeneral
1/10
27/04/2016
1
Sign in
to vote
WMP shows black due to hardware acceleration of the rendering (video layers etc). However
if you turn off hardware acceleration in WMP you can do print screen just fine.
And like the peeps above said, there is no way to prevent capture of the content if you
intend the users eyes to see said content. Hell what is to stop them plugging the monitor
output into another PC with a capture card/Tivo etc etc?
Side note VLC and PowerDVD both allow capturing of stills.
Thanks.
Mark Duffill
1,635 Points
All replies
0
Sign in
to vote
An obvious loophole is the user making a photo of her screen. Making any code designed
to prevent making a screen shot the normal way a waste of time. You cannot it prevent it
anyway unless you want to invest time writing video drivers.
Hans Passant.
Sunday, March 22, 2009 8:30 PM
Reply | Quote
https://social.msdn.microsoft.com/Forums/vstudio/en-US/9650cac8-9c83-4131-b85a-0b4d95a977ee/prevent-screen-capture?forum=vcgeneral
Moderator
236,895 Points
2/10
27/04/2016
0
Sign in
to vote
Well, assuming that I only want to protect against the simple, how would I go about
protecting my window from being captured? I pretty much just want to mimic what Windows
Media Player does when the user tries to capture the screen. The content turns black and
the user is left with nothing.
Thanks
Monday, March 23, 2009 1:38 PM
Reply | Quote
Jon Salepor
35 Points
0
Sign in
to vote
This is a hopeless effort. I can trivially copy screen regions using a free utility that sets up its
own hotkey. Your program hasn't any hope of disabling it.
Monday, March 23, 2009 3:40 PM
Reply | Quote
62,800 Points
1
Sign in
to vote
WMP shows black due to hardware acceleration of the rendering (video layers etc). However
if you turn off hardware acceleration in WMP you can do print screen just fine.
And like the peeps above said, there is no way to prevent capture of the content if you
intend the users eyes to see said content. Hell what is to stop them plugging the monitor
output into another PC with a capture card/Tivo etc etc?
Side note VLC and PowerDVD both allow capturing of stills.
Thanks.
https://social.msdn.microsoft.com/Forums/vstudio/en-US/9650cac8-9c83-4131-b85a-0b4d95a977ee/prevent-screen-capture?forum=vcgeneral
Mark Duffill
1,635 Points
3/10
27/04/2016
0
Sign in
to vote
https://social.msdn.microsoft.com/Forums/vstudio/en-US/9650cac8-9c83-4131-b85a-0b4d95a977ee/prevent-screen-capture?forum=vcgeneral
Jon Salepor
35 Points
4/10
27/04/2016
0
Sign in
to vote
It's not that simple, any application can get the desktop context and copy the contents into a
bitmap:
CBitmap* pbmpDesktop= 0;
CDC memDC;
CRect rect;
https://social.msdn.microsoft.com/Forums/vstudio/en-US/9650cac8-9c83-4131-b85a-0b4d95a977ee/prevent-screen-capture?forum=vcgeneral
Mark Duffill
1,635 Points
5/10
27/04/2016
0
Sign in
to vote
Thanks for the replies. I am writing an application that displays very private information to
the user and I would like to prohibit the user from saving this information.
To Mark: Is that the only way to make a copy of the window? I guess I am just looking for a
comprehensive list of all possible ways a user can capture my window so that I could try to
prevent at least the easiest ways :)
Thanks again.
Monday, March 23, 2009 10:40 PM
Reply | Quote
Jon Salepor
35 Points
2
Sign in
to vote
Even in the enterprise OA security applications, one of the invincible peeps is that 'capture
screen'.
The easier way to protect the private information could be to watch out the file I/O.
Anybody can capture the screen at one click but nobody can get it without saving it to a
storage device.
Regards,
https://social.msdn.microsoft.com/Forums/vstudio/en-US/9650cac8-9c83-4131-b85a-0b4d95a977ee/prevent-screen-capture?forum=vcgeneral
Yangghi Min
680 Points
6/10
27/04/2016
0
Sign in
to vote
This topic is far off-topic for this forum. If you are serious about getting a good answer, you
need to use a forum in which this topic is relevant.
This has been discussed very extensively in other forums. You are correct that the relevant
APIs can be hooked and such. You can also use relatively simple solutions. The simpler
solution is for you to implement, the simpler it is for someone to compromise. The simplest
solutions will work only for the least knowledgeable.
There are commercial software tools that you can purchase. You probably should use
something such as that. I don't know what any are so I hope you can find them.
Sam Hobbs; see my SimpleSamples.Info
Wednesday, March 25, 2009 12:51 AM
Reply | Quote
Simple Samples
11,680 Points
0
Sign in
to vote
Thanks Sam, I've looked all throughout the MSDN forums but I couldn't find a forum that is
more relavent to my question. Can you suggest a forum?
Wednesday, March 25, 2009 2:39 PM
Reply | Quote
https://social.msdn.microsoft.com/Forums/vstudio/en-US/9650cac8-9c83-4131-b85a-0b4d95a977ee/prevent-screen-capture?forum=vcgeneral
Jon Salepor
35 Points
7/10
27/04/2016
1
Sign in
to vote
First note that you should look at the sticky threads that are permanently stuck to the
beginning of each forum. The relevant one is The scope of this forum, which says that you
should use a newsgroup.
Note also that I did not say MSDN forum; I said forum. There are relevant forums in
CodeProject.com and CodeGuru.com and other sites. I know your question has been
discussed quite extensively in the CodeGuru forums.
Also the Where is the Forum For? forum is for asking where a forum is at for a specific
question.
Finally, the General Windows Development Issues forum is a MSDN forum for Windows
development.
Sam Hobbs; see my SimpleSamples.Info
https://social.msdn.microsoft.com/Forums/vstudio/en-US/9650cac8-9c83-4131-b85a-0b4d95a977ee/prevent-screen-capture?forum=vcgeneral
Simple Samples
11,680 Points
8/10
27/04/2016
0
Sign in
to vote
Like others have said its not possible to protect something from being captured your
displaying to the user. It will also work against you because legitimate users hate to have to
"mess around" to capture what they can anyway see.
If however you really WANT to punish your users in this manor then:
Your best bet is just to use DirectX or Windows Presentation Foundation for your
window output.
This makes screen capture a "pain the the a**" for developers and users alike (though there
are many tools to facilitate this they all require some form of API hooking or the capture of
the entire desktop surface (which means if you programatically use other windows to
obscure key areas of your display output no program will be able to capture your application
output unobscured without the use of hooks, which is of course a high priviledge operation
[we hope]).
Personally though I'd like to see an end to the "protectionism" approch to business and see
people moving back to the service model where people protect their business by providing
an unparelleled service instead of trying to "chain" their user base to their product (please
don't go Adobe on us Microsoft).
(Side note. I hope Microsoft start approching DRM from a "policing" approach and not from a
"protectionist" one. Then I also wish for world peace.. neither seems likely right now.)
Kind Regards, V Website: http://www.kvkconsultancy.co.uk
Saturday, February 05, 2011 3:48 PM
Reply | Quote
KVK Consultancy
245 Points
0
Sign in
to vote
Like others have said its not possible to protect something from being captured your
displaying to the user.
This is not true. A commercial application for the prevention of screen capture has been
available for more than a decade. ArtistScope provides the Copysafe solution which ensures
the best security for both document (local) protection and web (online) protection.
Their latest release, the ArtistScope Site Protection System (ASPS) uses a proprietary web
browser that provides the most secure copy protection environment for all web page media
including PDF and Flash... anything that can be displayed from a web page.
And yes, site owners do have a right to prevent copy and plagiarism.
https://social.msdn.microsoft.com/Forums/vstudio/en-US/9650cac8-9c83-4131-b85a-0b4d95a977ee/prevent-screen-capture?forum=vcgeneral
WilliamKent
0 Points
9/10
27/04/2016
DEV CENTERS
RELATED SITES
CONNECT
DEVELOPER RESOURCES
Windows
Visual Studio
Forums
Code samples
Office
Blog
Documentation
More...
VSIP Program
Downloads
Microsoft .NET
Microsoft Azure
Stack Overflow
REST APIs
YouTube
Virtual Labs
United States
2016 Microsoft
Terms of Use
Trademarks
Privacy Statement
Site Feedback
(English)
https://social.msdn.microsoft.com/Forums/vstudio/en-US/9650cac8-9c83-4131-b85a-0b4d95a977ee/prevent-screen-capture?forum=vcgeneral
10/10