I am a Delphi novice, but I’m trying to understand the relationship between TApplication and TfrmMain windows using Spy++. It seems that the TfrmMain window is the real window that has proper screen coordinates, but the TApplication window is the one that appears in the Windows taskbar. Also, they don’t seem to be related to each other at all. One isn’t the parent window of the other, so how are the windows linked together? And why is the non-UI window the one that gets the Windows taskbar button? Can any Delphi experts help me understand this?
I am a Delphi novice, but I’m trying to understand the relationship between TApplication
Share
TApplication is the class that encapsulates your application and handles things like the Windows Messaging. TfrmMain will be a subclass of TForm which will be your Applications ‘Main Form’.
So basically, TApplication is the controller so to speak and it owns and creates TfrmMain, and forwards messages to it, or any of it’s children.
Look in your projectname.pas file and you’ll see something like:
where Application is of type TApplication.