Click here to Skip to main content
15,896,063 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I want to disable print screen key, Key also not work than my form off focus.

So is it possible to disable Print screen key when my exe run ? Thank you in advance.

I was try

private void Display_KeyDown(object sender, KeyEventArgs e)
{
if (e.KeyCode == Keys.Snapshot)
this.Hide();
}
Posted
Updated 30-Mar-13 3:16am
v2
Comments
[no name] 30-Mar-13 9:17am    
You would need to research "global key hook". But this is a bad idea anyway. Disabling the print screen button when another application has focus is a real good way to piss your users off.

1 solution

There are some good ideas in the following links. There are many more on Google, available using search keywords how to disable print screen key C#

Low-level Windows API hooks from C# to stop unwanted keystrokes[^]

plz help me ,how to disable print screen?[^]

how to disable “PRINT SCREEN” button while running my Application in WPF?[^]

Disable Print Screen Key[^]
 
Share this answer
 
Comments
JayantaChatterjee 30-Mar-13 11:02am    
My 5 for your suggestion....

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