例一:
unit unit1;
interface
type
tform1=class(tform)
private
public
xx:boolean;
end;
var
Form1: TForm1;
implementation
end.
unit unit2;
interface
type
tform2=class(tform)
private
end;
var
Form2: TForm2;
implementation
uses unit1;
procedure tform2.formcreate(sender:tobject);
begom
form1.xx..................
end;
end.
=========================================
例二:
unit unit1;
interface
type
tform1=class(tform)
private
public
end;
var
Form1: TForm1;
xx:boolean;
implementation
end.
unit unit2;
interface
type
tform2=class(tform)
private
end;
var
Form2: TForm2;
implementation
uses unit1;
procedure tform2.formcreate(sender:tobject);
begom
xx..................
end;
end.