Title: How to know if the form is modalprocedure TForm1.Button1Click(Sender: TObject);begin if (fsModal in FormState) then ShowMessage('Form is modal.');end;