Hello,
i try to test the well known ping.pas / icmp.pas, without any luck
---
This the first few lines of the head of the Unit1:
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,Dialogs, StdCtrls, Ping;
type
TForm1 = class(TForm)
If i Write here :
Ping1:Tping;
then later i call: Ping1.Timeout := 3000;
I get the following error message: Exceptional class EAccessViolation with message Access violation at address 0045D810 in module 'Project1.exe'. Read of address 00000030.
If save and close the project, and open it again I get the following error message:
Field Form1.Ping1 does not have a corresponing component. Remove the declatation ?
---
If I move Ping1:Tping; to the 'var' part:
var
Form1: TForm1;
Ping1:Tping;
I get the following error message: Exceptional class EAccessViolation with message Access violation at address 0045CB98 in module 'Project1.exe'. Read of address 00000030.
---
If I add Ping1: Tping to Unit1.dfm:
object Form1: TForm1
Ping1= TPing
I get the first erro I had described.
---------
My question is: what am i doing wrong ?
i try to test the well known ping.pas / icmp.pas, without any luck
---
This the first few lines of the head of the Unit1:
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,Dialogs, StdCtrls, Ping;
type
TForm1 = class(TForm)
If i Write here :
Ping1:Tping;
then later i call: Ping1.Timeout := 3000;
I get the following error message: Exceptional class EAccessViolation with message Access violation at address 0045D810 in module 'Project1.exe'. Read of address 00000030.
If save and close the project, and open it again I get the following error message:
Field Form1.Ping1 does not have a corresponing component. Remove the declatation ?
---
If I move Ping1:Tping; to the 'var' part:
var
Form1: TForm1;
Ping1:Tping;
I get the following error message: Exceptional class EAccessViolation with message Access violation at address 0045CB98 in module 'Project1.exe'. Read of address 00000030.
---
If I add Ping1: Tping to Unit1.dfm:
object Form1: TForm1
Ping1= TPing
I get the first erro I had described.
---------
My question is: what am i doing wrong ?