Hola
Con el personal esto hace mejor efecto:
Código Delphi
[-]
var
Incio: TIncio(Form);
Contador: Integer;
procedure Tincio.FormCreate(Sender: TObject);
var Contador, TiempoBloqueo: Integer;
begin
Contador:=0;
end;
en el OnTimer del Timer:
procedure Tincio.Timer1Timer(Sender: TObject);
begin
Inc(Contador);
if Contador = 5 then
begin
MessageBox(Handle,
PChar('Si este G..... No viene en cinco minutos esta despedido.' + #13#10 +
'Ahh, y que no me venga con cuentos de que le dolía el estomago.'),
PChar('Sistema bloqueado'),
MB_OK + MB_ICONEXCLAMATION + MB_DEFBUTTON1 + MB_APPLMODAL);
end;
end;
en el OnMessage de un ApplicationEvents:
procedure Tincio.ApplicationEvents1Message(var Msg: tagMSG;
var Handled: Boolean);
begin
if
((Msg.message >= WM_MOUSEFIRST) and (Msg.message <= WM_MOUSELAST))
or
(Msg.message >= WM_KEYFIRST) and (Msg.message <= WM_KEYLAST)
then
begin
Contador := 0;
end;
Saludos