There are a couple of ways around this I agree with Svanels it is a bad idea to be messing with these key stokes.
But here goes:
<b>public</b>
Enabled1: Integer;
procedure TForm1.Button1Click(Sender: TObject);
var
Dummy : integer;
begin
Dummy := 0;
if Enabled1 = 1 then
Enabled1 := 0 //0 means enable ctl-alt-delete
else
Enabled1 := 1; //1 means disable controls
{Disable ALT-TAB}
SystemParametersInfo( SPI_SETFASTTASKSWITCH, Enabled1, @Dummy, 0);
{Disable CTRL-ALT-DEL}
SystemParametersInfo( SPI_SCREENSAVERRUNNING, Enabled1, @Dummy, 0);
end;
you can also Hide the App from the Task Bar like this:
// Hide from task bar
ShowWindow (Application.Handle, SW_HIDE);
You can prevent your App being closed by adding a Boolean variable and placing this in the OnCloseQuery for the Main Form, in this example BoClose is a global Variable
CanClose := BoClose;
//If CloseVariable (BoClose) is true it will close, but if false, it will not.
You can also hide the taskbar:
var
wndClass: Array[0..50] of Char;
wndHandle: THandle;
Procedure
//1) We need the TaskBar-class:
StrPCopy(@wndClass[0], 'Shell_TrayWnd');
//2) We need the TaskBar-handle:
wndHandle := FindWindow(@wndClass[0], nil);
// Hide Task Bar
ShowWindow(wndHandle, SW_HIDE);
// Show Task Bar
ShowWindow(wndHandle, SW_SHOW);
Hope this helps
Kind Regards, Paul Benn
**** Never Giveup, keep trying, the answer is out there!!! ****