1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: 40: 41: 42: 43: 44: 45: 46: 47: 48: 49: 50: 51: 52: 53: 54: 55: 56: 57: 58: 59: 60: 61: 62: 63: 64: 65: 66: 67: 68: 69: 70: 71: 72: 73: 74:
| unit Unit1;
interface
uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, JvTimer, JvExControls, JvLabel, JvSlider, StdCtrls, ExtCtrls, ComCtrls, JvExStdCtrls, JvEdit, JvButton, JvTransparentButton, JvListBox, JvLED, IdBaseComponent, IdComponent, IdRawBase, IdRawClient, IdIcmpClient, winsock;
type TForm1 = class(TForm) JvLabel1: TJvLabel; JvEdit1: TJvEdit; JvTransparentButton1: TJvTransparentButton; JvTransparentButton2: TJvTransparentButton; JvLED1: TJvLED; JvListBox1: TJvListBox; Timer1: TTimer; JvEdit2: TJvEdit; IdIcmpClient1: TIdIcmpClient; procedure JvTransparentButton1Click(Sender: TObject); procedure JvTransparentButton2Click(Sender: TObject); procedure JvEdit1Change(Sender: TObject); procedure Timer1Timer(Sender: TObject); procedure FormCreate(Sender: TObject);
private public end;
var Form1: TForm1; sTime: string; IP,BYTES, TTL, TIME : string;
implementation
{$R *.dfm}
procedure TForm1.JvTransparentButton1Click(Sender: TObject); var IdIcmpClient: TIdIcmpClient; begin Timer1.Enabled := True;
end;
procedure TForm1.JvTransparentButton2Click(Sender: TObject); begin Timer1.Enabled := False; end;
procedure TForm1.JvEdit1Change(Sender: TObject); begin Timer1.Interval := StrToInt(JvEdit1.Text); end;
procedure TForm1.Timer1Timer(Sender: TObject); begin JvListBox1.Items.Add('Timer1'); JvListBox1.ItemIndex := JvListBox1.Items.Count -1; end;
procedure TForm1.FormCreate(Sender: TObject); begin Timer1.Interval := StrToInt(JvEdit1.Text); end;
end. |