Windows DatabaseebooksStatistical Information

LLE10162 : Howto find the mainform in Delphi

Symptom:

You are programming in pascal and need to find the mainform

Cause:

Pascal (Delphi) has a predefined structure which can be used to find the mainform quickly

Solution:

You open the dpr file from the project and look at the end. You will find things like:

...
Application.Initialize;
Application.Title := 'Appname';
Application.CreateForm(TMainForm, MainForm);
...

The first form that has been created, is the form that will start the application after the "Application.Run" command in the delphi source code

...
Application.Run;
...

Hope this makes your life easier.

Disclaimer:

The information provided in this document is intended for your information only. Lubby makes no claims to the validity of this information. Use of this information is at own risk!
Copyright © 2004-2011 Lubby (V3.0.10 Aug 2011)
Sponsored by Keskon.
Statistical information by Google Analytics