Hi...
See the below code to clear the clipboard, to restrict the PrintScreen:
public bool
PreFilterMessage(ref Message
WM)
{
Keys kCode = (Keys)(int)WM.WParam & Keys.KeyCode;
if (kCode == Keys.Snapshot)
{
Clipboard.Clear();
MessageBox.Show("Printscreen
not allowed.");
return true;
}
return false;
}
or else use the below which is not allowing the user to
press the (display message on key press)
document.onkeydown = function(ev) {
var a;
ev =
window.event;
if (typeof
ev == "undefined") {
alert("PLEASE
DON'T USE KEYBORD");
}
a =
ev.keyCode;
alert("PLEASE DON'T USE KEYBORD");
return false;
}
document.onkeyup = function(ev) {
var charCode;
if (typeof
ev == "undefined") {
ev =
window.event;
alert("PLEASE DON'T USE KEYBORD");
} else
{
alert("PLEASE DON'T USE KEYBORD");
}
return
false;
}