Código
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, IdBaseComponent, IdComponent, IdIPWatch;
type
TForm1 = class(TForm)
IdIPWatch1: TIdIPWatch;
procedure FormCreate(Sender: TObject);
procedure IdIPWatch1StatusChanged(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.FormCreate(Sender: TObject);
begin
IdIPWatch1.HistoryEnabled := FALSE;
IdIPWatch1.Active := TRUE;
end;
procedure TForm1.IdIPWatch1StatusChanged(Sender: TObject);
begin
if IdIPWatch1.ForceCheck then
ShowMessage('Rede Conectada! ')
else
ShowMessage('Rede Caiu. Sistema será finalizado! ');
end;
end.
Planeta Delphi - www.planetadelphi.com.br - Todos os direitos reservados | Copyright 2001-2009