How to get a list from all opened forms of my software?

Rafael Cruz picture Rafael Cruz · Sep 23, 2011 · Viewed 7.1k times · Source

I want to ask the user to close all opened forms before terminate my application.

How can I automatically get a list from opened forms?

I'm using Delphi 2006, and don't using form's Auto-Create, but I'm using the auto created form's referenced var with Application.CreateForm.

My regards.

Answer

Ondrej Kelle picture Ondrej Kelle · Sep 23, 2011

Have a look at Screen.FormCount and Screen.Forms.