Delphi What is DelphiVCL.Application.CreateHandle?

FireWind

Свой
Регистрация
2 Дек 2005
Сообщения
1,957
Реакции
1,199
Credits
4,009
What is DelphiVCL.Application.CreateHandle?
By Muhammad Azizul Hakim July 27, 2021

We can use the CreateHandle property or DelphiVCL.Application.CreateHandle to generate a main window for the application if it does not already have one.

Do not call CreateHandle directly. In EXEs, the application’s constructor calls CreateHandle. In DLLs, it does not.

CreateHandle encapsulates much of what traditional Windows programs write in WinMain. For example, CreateHandle registers the Window Class, creates the application window, and determines how the application window is shown.

Let’s browse all the properties, methods, and built-in properties of the DelphiVCL.Application.CreateHandle using dir() command:
Python:
import DelphiVCL

dir(DelphiVCL.Application.CreateHandle)
See the responses in our Windows command prompt:
1627395703043.png
You can also read short information about the DelphiVCL.Application.CreateHandle using the print() command:
Python:
print(DelphiVCL.Application.CreateHandle)
print(DelphiVCL.Application.CreateHandle.__doc__)
See the responses in our Windows command prompt:
1627395740496.png