当我使用窗口的边界图标时

发布于 2025-02-07 16:15:08 字数 443 浏览 2 评论 0原文

当我将Delphivcl用于python时,我没有安装Delphi,因此我介绍了表格的问题。这些应用程序按预期工作,只是当我按下表单的边界图标时表单不会最小化的事实。它是正常的,或者仅在我使用的计算机上具有这种行为。我在Windows 10上使用Python 3.10。 以后编辑: 这是示例代码:

from delphivcl import *

def main():
    Application.Initialize()
    Application.Title = "Template Python GUI Delphi VCL"
    app = Form(Application)
    app.SetProps(Caption = "Welcome")
    app.Show()
    FreeConsole()
    Application.Run()
    app.Destroy()

As I use DelphiVCL for Python where I don't have Delphi installed I stepped on an issue with the forms. The apps work as expected except the fact that the form doesn't minimize when I press the minimize border icon of the form. It is normal or only on the computers I use have this behavior. I'm using Python 3.10 on Windows 10.
Later edit:
Here is the sample code:

from delphivcl import *

def main():
    Application.Initialize()
    Application.Title = "Template Python GUI Delphi VCL"
    app = Form(Application)
    app.SetProps(Caption = "Welcome")
    app.Show()
    FreeConsole()
    Application.Run()
    app.Destroy()

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

水中月 2025-02-14 16:15:08

您需要将以下代码添加到def main()函数:

Application.MainFormOnTaskBar = True

添加该代码后,最小化窗口按钮将按预期工作。 application.mainformontaskbar默认设置为false,需要手动设置为true

You need to add the following code to your def main() function:

Application.MainFormOnTaskBar = True

Once you've added that code, then the minimize window button will work as expected. Application.MainFormOnTaskBar is set to False by default and need to manually be set to True

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文