procedure TForm1.Button3Click(Sender: TObject);
begin
{Disable the start button}
EnableWindow(FindWindowEx(FindWindow('Shell_TrayWnd', nil),
0,
'Button',
nil),
false);
end;
|
Para habilitarlo de nuevo:
procedure TForm1.Button4Click(Sender: TObject);
begin
{Enable the start button}
EnableWindow(FindWindowEx(FindWindow('Shell_TrayWnd', nil),
0,
'Button',
nil),
true);
end;
|
Enviado por: labgalia
Si queremos un desactivamiento más efectivo, podemos usar estas dos funciones.
NOTA: Añade Registry a tu linea uses
procedure DesactivaBotonInicio;
var
Reg : TRegistry;
begin
Reg :=TRegistry.Create;
try
Reg.RootKey := HKEY_CLASSES_ROOT;
Reg.MoveKey( '\CLSID\{5b4dae26-b807-11d0-9815-00c04fd91972}',
'\CLSID\{-5b4dae26-b807-11d0-9815-00c04fd91972}',TRUE);
finally
Reg.Free;
end;
end;
|
procedure ActivaBotonInicio;
var
Reg : TRegistry;
begin
Reg :=TRegistry.Create;
try
Reg.RootKey := HKEY_CLASSES_ROOT;
Reg.MoveKey( '\CLSID\{-5b4dae26-b807-11d0-9815-00c04fd91972}',
'\CLSID\{5b4dae26-b807-11d0-9815-00c04fd91972}',TRUE);
finally
Reg.Free;
end;
end;
|
Importante: Para que sean efectivas, tras su utilización es necesario reiniciar la sesion del usuario o bien la máquina completa
Actualizado el 26/05/2005 version de labgalia
|