In my Delphi 7 application, some Runtime objects are created in the default form, such as buttons to handle registry, procedures, and common functions. There is one standard form of queries, another for editing records and one for reports. The standard form of record editing has the procedure "Save", it has the following:
//Evento Salvar de FrmPadraoEdit
procedure TFrmPadraoEdit.Salvar(Sender: TObject);
begin
ToolBar.Setfocus;
//Demais instruções
//deve continuar para a procedure Salvar do form herdado
end;
As the "btnSave" button is also on the default form, the "Save" event is already assigned to it.
It turns out that for each inherited form, the "Save" event has different instructions. In the standard form, after calling the "Save" event of itself, you can continue with the instructions in the "Save" event of the inherited form? For example:
//Evento Salvar de FrmDisciplinasEdit
procedure TFrmDisciplinasEdit.Salvar(Sender: TObject);
begin
//Aqui deveria continuar a execução
DM.cdsDisciplinasATIVO.Value := 1;
DM.cdsDisciplinasCREATED_BY.Value := V_LOGIN;
//Demais instruções...
DM.cdsDisciplinas.Post;
Close;
end;