unit DlgBase; interface uses Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,PowerCad; type TDlgBase = class(TComponent) private { Private declarations } FControl : TPowerCad; FDlgName : string; protected { Protected declarations } procedure Notification(AComponent: TComponent; Operation: TOperation); override; Procedure SetControl(value: TPowerCad);virtual; Property CadControl: TPowerCad read FControl write SetControl; public { Public declarations } Procedure Syncronize;virtual; Procedure Show;virtual; Procedure Locate(px,py:Integer);virtual; Property DlgName:string read FDlgName write FDlgName; published { Published declarations } end; implementation Procedure TDlgBAse.Syncronize; begin end; Procedure TDlgBAse.Show; begin end; Procedure TDlgBase.SetControl(value:TPowerCad); begin FControl := value; Syncronize; end; procedure TDlgBase.Locate(px, py: Integer); begin //*** end; procedure TDlgBase.Notification(AComponent: TComponent; Operation: TOperation); begin inherited Notification(AComponent, Operation); if (Operation = opRemove) then begin if (AComponent = FControl) then begin FControl := nil; CadControl := nil; end; end; end; end.