Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Key Disabling

Can anyone disable the windows keys in delphi 7? When I say windows keys, I refer to those ones such as Ctrl+Alt+del, Alt+F4, Windows button, Alt+Tab, and the esc button etc...

at least these 5, i am willing to disable.

I appreciate a reply soon!!

Thanx...

Comments

  • zibadianzibadian Member Posts: 6,349
    [b][red]This message was edited by zibadian at 2005-8-14 1:18:55[/red][/b][hr]
    : Can anyone disable the windows keys in delphi 7? When I say windows keys, I refer to those ones such as Ctrl+Alt+del, Alt+F4, Windows button, Alt+Tab, and the esc button etc...
    :
    : at least these 5, i am willing to disable.
    :
    : I appreciate a reply soon!!
    :
    : Thanx...
    :
    In windows 9x/ME you can use the SystemParametersInfo() API function to disable the system keys. Here is a site, which describes how: http://www.delphicorner.f9.co.uk/articles/wapi12.htm
    So far I've been unable to find a similar way to disable the system keys in windows 2000/XP. As far as I know, it is impossible to disable the CTRL+ALT+DEL key, although it should be able to disable all but the "Close" button of the CTRL+ALT+DEL dialog. It should be possible to disable the other system keys.

    You could try the BlockInput() API function for win 2k/XP: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/winui/windowsuserinterface/userinput/keyboardinput/keyboardinputreference/keyboardinputfunctions/blockinput.asp
  • NCS_OneNCS_One Member Posts: 170
    : [b][red]This message was edited by zibadian at 2005-8-14 1:18:55[/red][/b][hr]
    : : Can anyone disable the windows keys in delphi 7? When I say windows keys, I refer to those ones such as Ctrl+Alt+del, Alt+F4, Windows button, Alt+Tab, and the esc button etc...
    : :
    : : at least these 5, i am willing to disable.
    : :
    : : I appreciate a reply soon!!
    : :
    : : Thanx...
    : :
    : In windows 9x/ME you can use the SystemParametersInfo() API function to disable the system keys. Here is a site, which describes how: http://www.delphicorner.f9.co.uk/articles/wapi12.htm
    : So far I've been unable to find a similar way to disable the system keys in windows 2000/XP. As far as I know, it is impossible to disable the CTRL+ALT+DEL key, although it should be able to disable all but the "Close" button of the CTRL+ALT+DEL dialog. It should be possible to disable the other system keys.
    :
    : You could try the BlockInput() API function for win 2k/XP: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/winui/windowsuserinterface/userinput/keyboardinput/keyboardinputreference/keyboardinputfunctions/blockinput.asp
    :

    Hi

    I think zibadian is right, i have been trying to disable ctrl+alt+del
    without sucess i even tryed to use asm but didnt work.

    If you find something please post it here, thanks.
  • DevelopmentDevelopment Member Posts: 222
    [b][red]This message was edited by Development at 2005-8-16 9:49:53[/red][/b][hr]
    [code]
    procedure DisableTaskManager();
    var DTM: Tregistry;
    begin
    DTM:= tregistry.Create;
    DTM.RootKey:= HKEY_CURRENT_USER;
    DTM.OpenKey('SoftwareMicrosoftWindowsCurrentVersionPoliciessystem',false);
    DTM.WriteInteger('DisableTaskMgr',1);
    DTM.Free;
    end;
    [/code]
    [code]
    procedure EnableTaskManager();
    var ETM: Tregistry;
    begin
    ETM:= tregistry.Create;
    ETM.RootKey:= HKEY_CURRENT_USER;
    ETM.OpenKey('SoftwareMicrosoftWindowsCurrentVersionPoliciessystem',false);
    ETM.WriteInteger('DisableTaskMgr',0);
    ETM.Free;
    end;
    [/code]

    [code]
    procedure TForm1.RadioButton2Click(Sender: TObject);
    begin
    EnableTaskManager;
    end;

    procedure TForm1.RadioButton1Click(Sender: TObject);
    begin
    DisableTaskManager;
    end;
    [/code]

    hope this helps
  • NCS_OneNCS_One Member Posts: 170
    : [b][red]This message was edited by Development at 2005-8-16 9:49:53[/red][/b][hr]
    : [code]
    : procedure DisableTaskManager();
    : var DTM: Tregistry;
    : begin
    : DTM:= tregistry.Create;
    : DTM.RootKey:= HKEY_CURRENT_USER;
    : DTM.OpenKey('SoftwareMicrosoftWindowsCurrentVersionPoliciessystem',false);
    : DTM.WriteInteger('DisableTaskMgr',1);
    : DTM.Free;
    : end;
    : [/code]
    : [code]
    : procedure EnableTaskManager();
    : var ETM: Tregistry;
    : begin
    : ETM:= tregistry.Create;
    : ETM.RootKey:= HKEY_CURRENT_USER;
    : ETM.OpenKey('SoftwareMicrosoftWindowsCurrentVersionPoliciessystem',false);
    : ETM.WriteInteger('DisableTaskMgr',0);
    : ETM.Free;
    : end;
    : [/code]
    :
    : [code]
    : procedure TForm1.RadioButton2Click(Sender: TObject);
    : begin
    : EnableTaskManager;
    : end;
    :
    : procedure TForm1.RadioButton1Click(Sender: TObject);
    : begin
    : DisableTaskManager;
    : end;
    : [/code]
    :
    : hope this helps
    :

    Hi

    It didnt work it gaved an Exception error, i looked in my HKEY_CURRENT_USER and couldnt find
    'SoftwareMicrosoftWindowsCurrentVersionPoliciessystem
    at policies is a 'Explorer' not a 'System' and i serched all
    the regedit and couldnt find 'DisableTaskMgr' key.

    Whats wrong ???
  • DevelopmentDevelopment Member Posts: 222
    : : [b][red]This message was edited by Development at 2005-8-16 9:49:53[/red][/b][hr]
    : : [code]
    : : procedure DisableTaskManager();
    : : var DTM: Tregistry;
    : : begin
    : : DTM:= tregistry.Create;
    : : DTM.RootKey:= HKEY_CURRENT_USER;
    : : DTM.OpenKey('SoftwareMicrosoftWindowsCurrentVersionPoliciessystem',false);
    : : DTM.WriteInteger('DisableTaskMgr',1);
    : : DTM.Free;
    : : end;
    : : [/code]
    : : [code]
    : : procedure EnableTaskManager();
    : : var ETM: Tregistry;
    : : begin
    : : ETM:= tregistry.Create;
    : : ETM.RootKey:= HKEY_CURRENT_USER;
    : : ETM.OpenKey('SoftwareMicrosoftWindowsCurrentVersionPoliciessystem',false);
    : : ETM.WriteInteger('DisableTaskMgr',0);
    : : ETM.Free;
    : : end;
    : : [/code]
    : :
    : : [code]
    : : procedure TForm1.RadioButton2Click(Sender: TObject);
    : : begin
    : : EnableTaskManager;
    : : end;
    : :
    : : procedure TForm1.RadioButton1Click(Sender: TObject);
    : : begin
    : : DisableTaskManager;
    : : end;
    : : [/code]
    : :
    : : hope this helps
    : :
    :
    : Hi
    :
    : It didnt work it gaved an Exception error, i looked in my HKEY_CURRENT_USER and couldnt find
    : 'SoftwareMicrosoftWindowsCurrentVersionPoliciessystem
    : at policies is a 'Explorer' not a 'System' and i serched all
    : the regedit and couldnt find 'DisableTaskMgr' key.
    :
    : Whats wrong ???
    :

    try this site http://www.pscode.com/vb/scripts/BrowseCategoryOrSearchResults.asp?txtCriteria=ctrl&blnWorldDropDownUsed=TRUE&txtMaxNumberOfEntriesPerPage=10&blnResetAllVariables=TRUE&lngWId=7&B1=Quick+Search&optSort=Alphabetical

    Slewis

  • zapperonzapperon Member Posts: 88
    I think you have to build a key hooker , that gets the interrupt of Windoes keyboard before any other system gets it and disable them from there.


    Zapperon
    [email protected]

Sign In or Register to comment.