How will i disable Print Screen whil my WPF application is running...?
views:
115answers:
6Not possible, and even if it were possible, it would be easily circumvented by a cell phone camera. Many are in the megapixel resolution range, making it quite easy for someone to get the information they want.
Simply speaking, you cannot. "Print screen" just copies the pixels on the screen to the clipboard, and is not part of your application.
The only way I can think of is to use the native Windows API (SetWindowsHookEx) to catch all keystrokes and filter out the PrintScreen key. However this would involve creting a native (i.e. unmanaged) DLL to actually do the keystroke processing.
Basically you can hook to the ClipBoard events and then set the image copied to null if someone does it. So they can copy the image but it will be reset:
Have a look at this:
http://stackoverflow.com/questions/621577/clipboard-event-c
Alternatively in a timer, check the content of the clip board and clear it as soon as it is set to a picture.
No, No way to do that. Even if you capture the Print Screen key in your application user might set focus to some other application and then do the Print screen(having your application on side etc.).
Only way would be to create a dummy application in background which captures all keystrokes using Keyboard Hooks and filters Print Screen, but that will happen for all applications not just yours. And moreover as George said user can use cellphone camera too!
I think Microsoft Rights Management System can help. Give it a try. Following is the link: