Firemonkey: How to iterate through all forms in the application using TScreen.Forms

  

I am attempting to iterate through the forms I have open in my application. I have found the documentation for FMX.Forms.TScreen.Forms, which looks like it can be used to accomplish my goal. However, I am confused on how I am supposed to use it.

At first I tried this in a function within my form’s CPP file:

ShowMessage( Forms::TScreen::FormCount );

This produced the error ‘Member TScreen::FormCount cannot be used without an object’

I figured that to mean that I need to attempt to access this property from my form, or from the global Application variable. I tried both

this->Forms…
Application->Forms…

and

this->TScreen…
Application->TScreen…

However, neither Forms nor TScreen exist within either of these objects.

How do I go about accessing Forms.TScreen.Forms?

Comments are closed.