Home
Top.Mail.Ru Yandeks.Metrika
Forum: "WinAPI";
Current archive: 2004.12.12;
Download: [xml.tar.bz2];

Down

How to block Print Screen? Find similar branches


boban   (2004-10-27 19:00) [0]

How to block the "Print Screen" key from the application so that the user cannot take a copy of the screen to the clipboard?

Thank you in advance



Rex Well   (2004-10-27 19:34) [1]

Hook

You catch the message of pressing a button, you recognize this button - Prt Scr and reduce the composition of the message to nothing. For example, you change the key code, say Pause Break or End, or another thread, an unused key ...

This is one of the options ... And there, see for yourself.



Boban   (2004-10-28 16:18) [2]

Found in the FAQ, maybe someone is interested:

type
TForm1 = class (TForm)
procedure FormCreate (Sender: TObject);
procedure FormDestroy (Sender: TObject);
private
{Private declarations}
procedure WMHotKey (var Msg: TWMHotKey); message WM_HOTKEY;
public
{Public declarations}
end;

was
Form1: TForm1;

implementation

{$ R * .DFM}

const id_SnapShot = 101;

procedure TForm1.WMHotKey (var Msg: TWMHotKey);
begin
// You can’t paste anything here - nothing gets to the clipboard anyway
if Msg.HotKey = id_SnapShot then
ShowMessage ("GotIt");
end;

procedure TForm1.FormCreate (Sender: TObject);
begin
RegisterHotKey (Form1.Handle,
id_SnapShot,
0,
VK_SNAPSHOT);
end;

procedure TForm1.FormDestroy (Sender: TObject);
begin
UnRegisterHotKey (Form1.Handle, id_SnapShot);
end;



Boban   (2004-10-28 16:19) [3]

Deleted by moderator



cerber1 ©   (2004-10-31 13:27) [4]

And it is possible through Lockmemory with a pointer to the clipboard.



Anatoly Podgoretsky ©   (2004-10-31 13:36) [5]

Those who really want to copy use special programs that work without this key and clipboard.



Pages: 1 whole branch

Forum: "WinAPI";
Current archive: 2004.12.12;
Download: [xml.tar.bz2];

Top





Memory: 0.56 MB
Time: 0.075 c
8-1093890137
Pavel Landgraf
2004-08-30 22:22
2004.12.12
reading format RealAudio


3-1100531559
Dionnis
2004-11-15 18:12
2004.12.12
Using indexes


14-1101208425
IMHO
2004-11-23 14:13
2004.12.12
Ukraine!


1-1101838448
Ermak
2004-11-30 21:14
2004.12.12
Tooltip ONLY in StatusBar


3-1100174065
S @ lik
2004-11-11 14:54
2004.12.12
Copying a table





afrikaans albanian Arabic armenian azerbaijani basque belarusian bulgarian catalan Chinese (Simplified) Chinese (Traditional) croatian Czech danish Dutch English estonian filipino finnish French
galician georgian German greek haitian Creole hebrew Hindi hungarian icelandic Indonesian Irish italian Japanese Korean latvian lithuanian macedonian malay maltese norwegian
persian polish portuguese Romanian russian serbian slovak Slovenian Spanish swahili Swedish ภาษาไทย turkish Ukrainian urdu Tiếng Việt welsh yiddish bengali bosnian
cebuano Esperanto gujarati hausa hmong igbo javanese kannada Khmer lao latin maori marathi mongolian nepali punjabi somali tamil telugu yoruba
zulu
English French German Italian Portuguese Russian Spanish