how to disable “PRINT SCREEN” button while running

2019-01-26 09:44发布

How can I disable Print Screen functionality while my WPF application is running?

The use-case is that my client wants to avoid unnecessary replication of valuable patient-centric data from the outside world and they provide the physical security to keep people from taking data through non-digital means.

8条回答
成全新的幸福
2楼-- · 2019-01-26 10:17

I think Microsoft Rights Management System can help. Give it a try. Following is the link:

Microsoft Rights Management System

查看更多
时光不老,我们不散
3楼-- · 2019-01-26 10:19

Simply speaking, you cannot. "Print screen" just copies the pixels on the screen to the clipboard, and is not part of your application.

查看更多
Root(大扎)
4楼-- · 2019-01-26 10:19

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 creating a native (i.e. unmanaged) DLL to actually do the keystroke processing.

查看更多
走好不送
5楼-- · 2019-01-26 10:26

Easy:

Windows.UI.ViewManagement.ApplicationView.GetForCurrentView().IsScreenCaptureEnabled = false;
查看更多
戒情不戒烟
6楼-- · 2019-01-26 10:27

It's not possible to disable printing, 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.

If you want to disable the Print Screen Key on your keyboard, Jodrell's answer gives a way of doing that (understanding that it's not going to keep people from printing, and a determined user will find a way around that).

Really, it all comes down to trust. If an employer can't trust their employees not to remove data that is already protected by law in most jurisdictions (HIPAA in the USA), then there's a bigger issue at stake.

查看更多
等我变得足够好
7楼-- · 2019-01-26 10:28

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!

查看更多
登录 后发表回答