procedure TForm1.Button1Click(Sender: TObject); begin Form2 := TForm2.Create(Self); Form2.ShowModal(procedure(ModalResult : TModalResult) begin if ModalResult = mrOK then // do something here end); end;