I am trying to execute code on a modal form but only when the ModalResult=mrOk
At OnClose event of the form doesn't seem to have the ModalResult assigned yet so I cannot distinguish here if the form is closing with such modal result. I do not want to execute this code if the user is cancelling the form.
I have code on the TBitBtn with Kind=bkOk on click event, but this is not executed if the user presses enter elsewhere on the form.
Executing the code outside the form seems cumbersome at best.
Please help