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

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


A possible solution (I use in C#) is to store every opened form instance in a list var. For example you could have a global list named openedForms; when every form is created, form itself can add its reference to openedForms and remove it when closing.
When user tries to close your app, you could check that list count is greater than zero and, if user wants really close, you close gracefully every form instance contained in openedForms before shutting the app down.