Ver Mensaje Individual
  #10  
Antiguo 31-12-2004
Aztaroth Aztaroth is offline
Miembro
 
Registrado: dic 2003
Ubicación: Matamoros
Posts: 52
Reputación: 21
Aztaroth Va por buen camino
No permitir ejecutar aplicaciones

Yo utilizo este codigo y me ha servido al 100%

me pongo un TTimer con el tiempo a 1 o 3 segundos dependiendo cada cuanto tiempo quieres checar,

Código Delphi [-]
procedure TForm1.DestruyeVentana(clase, nombre: String);
var
   handle : THandle;

begin
   if( clase <> '') then
      handle := FindWindow(PChar(clase), nil)
   else
      handle := FindWindow(nil, PChar(nombre));


   if handle <> 0 then
      SendMessage(handle, WM_SYSCOMMAND, SC_CLOSE, 0);
end;

procedure TForm1.Timer1Timer(Sender: TObject);
begin
   DestruyeVentana('IEFRAME', ''); //Internet Explorer
   DestruyeVentana('MSBLClass', ''); 
   DestruyeVentana('WMPlayerApp', '');
   DestruyeVentana('Media Player 2', '');
   DestruyeVentana('MMFRAME_MAIN', '');
   DestruyeVentana('FreeWClass', '');
   DestruyeVentana('Minesweeper', '');
   DestruyeVentana('Solitaire', '');
   DestruyeVentana('Buscaminas', '');


end;
Responder Con Cita