Someone showed me that there was just one small key that I didn't do. The code:
Note that ResultForm may be declared as an global variable of TResultForm or as a local variable. Not yet sure if a difference arrises later though.
procedure TMainForm.Button1Click(Sender: TObject);
begin
ResultsForm := TResultForm.Create(self);
try
ResultsForm.ShowModal;
finally
ResultsForm.Free;
end;
end;
for dynamically creating a new form is sound but one should take care to note that the dynamically created form MUST HAVE ITS VISIBILITY SET TO FALSE. Else an error like:
'Cannot make a visible window modal.'
will appear.
Probably seems very logical, hopefully nobody else makes this same stupid mistake!