Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Disable Ctrl-Alt-Del in Windows 2000

Status
Not open for further replies.

Eggdude

Programmer
May 17, 2002
5
0
0
US
I am making a kiosk-like application where I need prevent usage of the system except for using my program. I know it is really easy to do in Windows 98 but how can you disable keys like Ctrl-Alt-Del, Alt-Tab, and Ctrl-Escape in Windows 2000. I would prefer the easiest way because my programming skills aren't very advanced yet. Thanks in advance.
 
I wouldn't mess with ctrl-alt-del in Windows 2000 or NT, because that sequence is part of operating system.

Regards Steven van Els
SAvanEls@cq-link.sr
 
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!!! ****
 
I think that method of disabling the keys only works in windows 98 because it doesn't work on my 2000 machine. The only tips helped though. Thanks.
 
Ctrl-Alt-Del in Windows NT or Windows 2000 is used for log-on, intercept processes, change user and lock the work-station. Different form the meaning in win9x or Win Me where this sequence i9s used to restart, or reset the computer.

NT and 2000 are true multi - tasking operating systems, and although the appearance may be the same like Win98, it is a totally different Operating System. Steven van Els
SAvanEls@cq-link.sr
 
For a kiosk, I suggest that you physically remove the Escape, both Alt keys and the Windows keys from your keyboard. You may wish to run a couple of wires from the Alt key to a key switch; this way, anyone with the key can do functions like Alt-Tab, Alt-F4, Ctrl-Alt-Del, or whatever.

Also consider doing away with the entire numeric keypad, and PrintScreen, ScrollLock and Pause. Useless for most kiosk applications anyway; and just serve to intimidate novice users. Depending on your application, you might also want to get rid of the F-keys. Small square key caps generally just pop off, and you can build a custom mask to hide the space.

You can also force your app to go borderless by setting the form's BorderStyle to bsNone, and you can have it fill the screen:
Code:
Left := 0;
Top := 0;
Width := Screen.Width;
Height := Screen.Height;
-- Doug Burbidge mailto:doug@ultrazone.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top