什么是Delphi VCL.Application.CreateHandle?

253 阅读1分钟

我们可以使用CreateHandle方法或DelphiVCL.Application.CreateHandle来为应用程序生成一个主窗口,如果它还没有一个的话。

不要直接调用CreateHandle。在EXE中,应用程序的构造函数会调用CreateHandle。在DLLs中,它不会这样做。

CreateHandle封装了许多传统Windows程序在WinMain中写的东西。例如,CreateHandle注册了Window类,创建了应用程序窗口,并决定了应用程序窗口的显示方式。

让我们用dir()命令浏览DelphiVCL.Application.CreateHandle的所有属性、方法和内置属性。

import DelphiVCL

dir(DelphiVCL.Application.CreateHandle)

请看我们的Windows命令提示符中的反应。

0dir-8504152

你也可以使用print()命令来阅读DelphiVCL.Application. CreateHandle的简短信息。

print(DelphiVCL.Application.CreateHandle)
print(DelphiVCL.Application.CreateHandle.__doc__)

请看我们的Windows命令提示符中的响应。

0print-1827222

查看DelphiVCL,它可以轻松地让你使用Python为Windows建立GUI。

The postWhat is DelphiVCL.Application.CreateHandle?first appeared onPython GUI.