We can use the CreateHandle method 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:
1 2 3 |
import DelphiVCL dir(DelphiVCL.Application.CreateHandle) |
See the responses in our Windows command prompt:
You can also read short information about the DelphiVCL.Application.CreateHandle using the print() command:
1 2 |
print(DelphiVCL.Application.CreateHandle) print(DelphiVCL.Application.CreateHandle.__doc__) |
See the responses in our Windows command prompt:
Check out DelphiVCL which easily allows you to build GUIs for Windows using Python.