Delphi How to use the DelphiVCL.Application.Run Property

FireWind

Свой
Регистрация
2 Дек 2005
Сообщения
1,957
Реакции
1,199
Credits
4,009
How to use the DelphiVCL.Application.Run Property
By Muhammad Azizul Hakim June 12, 2021

DelphiVCL.Application.Run property used to execute the application.

Do not call DelphiVCL.Application.Run. In Delphi’s VCL, when creating a new project, The IDE automatically creates a main program block in the project file that calls the Run method. When the application is executed, the application’s Run method is called.

DelphiVCL.Application.Run contains the application’s main message loop. The call to Run does not return until the application’s message loop terminates.

Let’s browse all the properties, methods, and built-in properties of the DelphiVCL.Application.Run using dir() command:\
Python:
import DelphiVCL
 
dir(DelphiVCL.Application.Run)
See the responses in our Windows command prompt:

1623527911765.png
Here is the working example of the implementation of DelphiVCL.Application.Run:
Python:
def main():
    Application.Initialize()
    Application.Title = "MyDelphiApp"
    f = MainForm(Application)
    f.Show()
    FreeConsole()
    Application.Run()
    Application.Destroy()
 
main()
See the complete code Для просмотра ссылки Войди или Зарегистрируйся and Для просмотра ссылки Войди или Зарегистрируйся.