Click here to Skip to main content
14,926,224 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
Dear All,

I need your help,I have made a website for security resion I want to disable a print
screen button for a all browser like IE,Firefox,Safari,Google chrome ..


Please provide the solution in Asp.net

Thanks
Pradeep Mishra
Posted

You cannot stop the key from being pressed nor seen by the system. The links you have all try to circumvent this problem by intercepting clipboard operations. The default behavior of the print screen key puts a screen image on the clipboard. These workarounds overwrite the contents of the clipboard, thereby erasing the screen image.

But, that doesn't stop anyone from installing some screen grabber utility that does not use the clipboard, which is pretty much all of them.


In short, you cannot stop someone from grabbing a screen image of your website from your HTML page.

The only thing I can think of that MIGHT work (and not in all situations!) is to write an ActiveX control that your site has to install on the clients workstation in order to use your website. This control would have to install a global keyboard hook where you can intercept and eat the message that says the print screen was pressed. But even this can be gotten around since some screen grabbers will let you customize the keystrokes used to tell them to take a snapshot.
   
The solution is you can not control anything that's running out of the browser, also its a event that occur at windows side which is almost not doable via any browser events.
   
Almost impossible but take a look at this thread[^] and follow the link (2nd bottom)
   
Maybe this article can help you out:
Disable Print Screen Key and All Keyboard Keys in ASP.NET Page[^]

Although I think you cannot disable it completely because somewhat more advanced users would figure something out.

Good luck!
   

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900