unit Unit_A;
interface
uses
Unit_B,
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
type
TForm_A =
class(TForm)
editA: TEdit;
procedure editAChange(Sender: TObject);
private
{ Private-Deklarationen }
Form_B: TForm_B;
Procedure GotNotifyFromB(text:
String);
public
{ Public-Deklarationen }
constructor create(AOwner:TComponent);
override;
destructor destroy;
override;
end;
var
Form_A: TForm_A;
implementation
{$R *.dfm}
constructor TForm_A.create(AOwner:TComponent);
begin
inherited;
Form_B := TForm_B.Create(Self);
Form_B.DoNotifyA := GotNotifyFromB;
Form_B.Constraints := Self.Constraints;
Form_B.Top := Self.Top;
Form_B.Left := Self.Left+Self.Width;
Form_B.Show;
end;
destructor TForm_A.destroy;
begin
if Assigned(Form_B)
then Form_B.Free;
inherited;
end;
Procedure TForm_A.GotNotifyFromB(text:
String);
begin
editA.Text := text;
end;
procedure TForm_A.editAChange(Sender: TObject);
begin
if Assigned(Form_B)
then Form_B.editB.Text := editA.Text;
end;
end.