gpt4 book ai didi

nsis - 如何隐藏所有窗口,直到我在 NSIS 中需要它们

转载 作者:行者123 更新时间:2023-12-04 00:54:08 24 4
gpt4 key购买 nike

我有一个 NSIS 安装程序,除非它需要下载其他文件,否则我想完全保持安静。我可以使用 SilentInstall 使其完全静音,但随后我无法显示我的下载对话框(我正在使用 InetLoad::load)。

我想告诉 NSIS 在我说之前不要显示任何窗口。我能想到的最好的是 HideWindow。不幸的是,它看起来像 NSIS 默认显示窗口然后隐藏它导致闪烁。

如何防止闪烁的窗口?

示例代码:

Name "Flicker test"OutFile "flickertest.exe"AutoCloseWindow trueSection    HideWindowSectionEnd

最佳答案

这是一种 hack 方式:

!include "${NSISDIR}\Examples\System\System.nsh"

Name "No Flicker test"
OutFile "noflickertest.exe"

AutoCloseWindow true

Function .onGUIInit
; move window off screen
System::Call "User32::SetWindowPos(i, i, i, i, i, i, i) b ($HWNDPARENT, 0, -10000, -10000, 0, 0, ${SWP_NOOWNERZORDER}|${SWP_NOSIZE})"
FunctionEnd

Section -main
HideWindow
SectionEnd

关于nsis - 如何隐藏所有窗口,直到我在 NSIS 中需要它们,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1604205/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com