I have a primary TForm (Form1) that opens a secondary one (Form2) through "Form2.ShowModal;".
Clicking a button in the second TForm, the TForm is closed through "Close;".
Thereafter I would expect in the primary form to get Form2.ModalResult = mrClose, that is = 11.
Instead, I find Form2.ModalResult = 2 (= mrCancel).
And actually, also when I close the second TForm using the X in the top right corner, I invariably get Form2.ModalResult = 2, whereas I would expect Form2.ModalResult = mrAbort.
Can anybody explain this ?