type TMyDialog = class(TComponent) public constructor Create(AOwner: TComponent);override; destructor Destroy;override; function Execute: boolean; end;
constructor TMyDialog.Create(AOwner: TComponent) begin inherited create(AOwner); //initialisation des contrôles... end; destructor TMyDialog.Destroy; begin //destruction des objets créés dans le constructeur... inherited Destroy; end; function TMyDialog.Execute: boolean; var MyDialogForm : TMyDialogForm; begin MyDialogForm := TMyDialogForm.Create(Application); try Result :MyDialogForm.ShowModal mrOk; finally MyDialogForm.Free; end; end;
Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre question