28. maj 2009 - 10:11Der er
4 kommentarer og 1 løsning
Fange Ctrl + Alt + Del
Halløj,
Hvordan fanger jeg og stopper Ctrl + Alt + Del?
Har forsøgt mig med dette, men det virker ikke:
procedure TForm1.FormKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState); begin if (Shift = [ssCtrl]) and (Shift = [ssAlt]) and (Key = VK_DELETE) then Key := 0;
og
if (Shift = [ssCtrl]) and (Key = VK_Menu) and (Key = VK_DELETE) then Key := 0;
Using the SystemParametersInfo API function you can trick Windows into thinking that the screen saver is running. Doing so disables the Ctrl-Alt-Delete key sequence from displaying the "Close Program" dialog and rebooting the computer and Alt-Tab from switching to another application. It also stops Ctrl-Esc from opening the Start Menu. If you wish to disable those keys while your application is running call the following SystemKeys function (place it in the Implementation section of your unit's code - and call from any procedure in your application - where needed). When you call SystemKeys, if Disable is True, the keys will be disabled, False otherwise.
procedure SystemKeys(Disable: Boolean) ; var OldVal : LongInt; begin SystemParametersInfo(SPI_SCREENSAVERRUNNING, Word(Disable), @OldVal, 0) ; end; After a call to SystemKeys(True) the program runs, but you are unable to Alt-Tab to it nor switch to it in the task list. You can't invoke the Start button, either.
så vidt jeg husker så er der en værdi i registreringsdatabasen der bestemmer rettighederne for "abegrebet", så principielt kan du skrive til regbasen og slå det til og fra der.
Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.