desativar a funçao ctrl alt del e tecla windows no xp
Pessoal no win98 eu uso a rotina abaixo para inibir o presionamento das teclas ctrl + alt + del.
// api
if CheckBoxCtrlAltDel.Checked then
SystemParametersInfo(SPI_SCREENSAVERRUNNING,1, @Dummy, 0)
else
SystemParametersInfo(SPI_SCREENSAVERRUNNING,0, @Dummy, 0);
Para inibir a tecla de atalho do windows eu utilizo a função abaixo:
if CheckBoxWin.Checked then
SystemParametersInfo(SPI_SCREENSAVERRUNNING,Word(True),nil,00);
else
SystemParametersInfo(SPI_SCREENSAVERRUNNING,Word(False),nil,00);
Gostaria de saber como faço para fazer a mesma coisa quando rodo com o win xp.
// api
if CheckBoxCtrlAltDel.Checked then
SystemParametersInfo(SPI_SCREENSAVERRUNNING,1, @Dummy, 0)
else
SystemParametersInfo(SPI_SCREENSAVERRUNNING,0, @Dummy, 0);
Para inibir a tecla de atalho do windows eu utilizo a função abaixo:
if CheckBoxWin.Checked then
SystemParametersInfo(SPI_SCREENSAVERRUNNING,Word(True),nil,00);
else
SystemParametersInfo(SPI_SCREENSAVERRUNNING,Word(False),nil,00);
Gostaria de saber como faço para fazer a mesma coisa quando rodo com o win xp.
Moraes
Curtidas 0
Respostas
Garoto Programa
04/08/2003
Prezado,
A função que utilizo é diferente da sua e uma unica linha ativa e desativa as teclas do Win98 e ctrl+alt+del
Ai esta a função
// liga a trava (CTRL + ALT + DEL)
SystemParametersInfo(97, Word(True), @OldValue, 0);
// desliga a trava (CTRL + ALT + DEL)
SystemParametersInfo(97, Word(False), @OldValue, 0);
Teste no XP talves funcione.
Que Deus lhe abençoe.
A função que utilizo é diferente da sua e uma unica linha ativa e desativa as teclas do Win98 e ctrl+alt+del
Ai esta a função
// liga a trava (CTRL + ALT + DEL)
SystemParametersInfo(97, Word(True), @OldValue, 0);
// desliga a trava (CTRL + ALT + DEL)
SystemParametersInfo(97, Word(False), @OldValue, 0);
Teste no XP talves funcione.
Que Deus lhe abençoe.
GOSTEI 0
Gibajnr
04/08/2003
:wink: Esssa dica que o companheiro passou não funciona no XP. Ela também não funciona no windows 2000. Isso Ocorre porque tanto o Windows XP quanto o Windows 2000 Utilizam um Kernel Baseado no NT que por razões de segurança não é tão maleável quanto os windows domésticos(win95, win98, ME). Infelizmente eu também nunca encontrei uma maneira de Desativar as teclas. Caso Alguém Consiga, passe a dica para nós.
GOSTEI 0
Vmotta
04/08/2003
Pessoal, para bloquear o Ctrl+Alt+Del no Xp e 2000 precisa editar o registro:
entrem em:
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\System
insira um valor DWORD com o nome DisableTaskMgr e Dados do valor = 1 para bloquear ou 0 para liberar.
qq dúvida me mande um e-mail
t+
Vitor <vmotta@eep.br>
entrem em:
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\System
insira um valor DWORD com o nome DisableTaskMgr e Dados do valor = 1 para bloquear ou 0 para liberar.
qq dúvida me mande um e-mail
t+
Vitor <vmotta@eep.br>
GOSTEI 0
Okama
04/08/2003
Recebi um código um vez, mas não sei se funciona :cry:
implementation
{$R *.DFM}
{Para ocultar um programa, deve-se registrar este como um serviço do Windows. Normalmente um serviço do Windows é ativado quando com a inicialização do sistema (Windows) e pemanece ativo até a finalização deste. Este processo esconde o programa da lista "Ctrl+Alt+Del"}
Const
Servico_Simples = 1;
Servico_Unregister = 1;
Function RegisterServiceProcess(DwProcessID, dwType: DWord): DWord; StdCall; External ´KERNEL32.dll´;
procedure TForm1.FormCreate(Sender: TObject);
begin
RegisterServiceProcess(GetCurrentProcessID, Servico_Simples);
end;
procedure TForm1.FormDestroy(Sender: TObject);
begin
RegisterServiceProcess(GetCurrentProcessID, Servico_Unregister);
end;GOSTEI 0
Vmotta
04/08/2003
Amigo, esse código tira a aplicação da lista de programas do Ctrl+Alt+Del, mas tb só funciona até o win ME.
Abraços
Vitor <vmotta@eep.br>
Abraços
Vitor <vmotta@eep.br>
GOSTEI 0
Euclides Cunha
04/08/2003
Testado no Windows 7
unit Unit1;
interface
uses
Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls, Registry;
type
TForm1 = class(TForm)
Button1: TButton;
Button2: TButton;
procedure Button1Click(Sender: TObject);
procedure DisableTaskMgr(bTF: Boolean);
procedure Button2Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
begin
DisableTaskMgr(True); // Travar
end;
procedure TForm1.Button2Click(Sender: TObject);
begin
DisableTaskMgr(False); // Destravar
end;
procedure TForm1.DisableTaskMgr(bTF: Boolean);
var
reg: TRegistry;
begin
reg := TRegistry.Create;
reg.RootKey := HKEY_CURRENT_USER;
reg.OpenKey('Software', True);
reg.OpenKey('Microsoft', True);
reg.OpenKey('Windows', True);
reg.OpenKey('CurrentVersion', True);
reg.OpenKey('Policies', True);
reg.OpenKey('System', True);
if bTF = True then
begin
reg.WriteString('DisableTaskMgr', '1');
end
else if bTF = False then
begin
reg.DeleteValue('DisableTaskMgr');
end;
reg.CloseKey;
end;
end.
unit Unit1;
interface
uses
Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls, Registry;
type
TForm1 = class(TForm)
Button1: TButton;
Button2: TButton;
procedure Button1Click(Sender: TObject);
procedure DisableTaskMgr(bTF: Boolean);
procedure Button2Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
begin
DisableTaskMgr(True); // Travar
end;
procedure TForm1.Button2Click(Sender: TObject);
begin
DisableTaskMgr(False); // Destravar
end;
procedure TForm1.DisableTaskMgr(bTF: Boolean);
var
reg: TRegistry;
begin
reg := TRegistry.Create;
reg.RootKey := HKEY_CURRENT_USER;
reg.OpenKey('Software', True);
reg.OpenKey('Microsoft', True);
reg.OpenKey('Windows', True);
reg.OpenKey('CurrentVersion', True);
reg.OpenKey('Policies', True);
reg.OpenKey('System', True);
if bTF = True then
begin
reg.WriteString('DisableTaskMgr', '1');
end
else if bTF = False then
begin
reg.DeleteValue('DisableTaskMgr');
end;
reg.CloseKey;
end;
end.
GOSTEI 0