unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, OleCtnrs, ExtCtrls;
type
TForm1 =
class(TForm)
Panel1: TPanel;
Button1: TButton;
OleContainer1: TOleContainer;
Label1: TLabel;
procedure Button1Click(Sender: TObject);
private
OleObjekt: OleVariant;
procedure OnChangeEdit2Text(Sender: TObject;
const Param1: WideString);
public
{ Public-Deklarationen }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
begin
OleContainer1.CreateObject('
ActiveFormXOle1Proj1.ActiveFormXOle1', false);
OleContainer1.DoVerb(ovShow);
OleObjekt := OleContainer1.OleObject;
OleObjekt.OnChangeEdit2Text := OnChangeEdit2Text;
end;
procedure TForm1.OnChangeEdit2Text(Sender: TObject;
const Param1: WideString);
begin
Label1.Caption := Param1;
end;