通过快速更新停止闪烁GUI 的任何方法?在线搜索对双缓冲区等可能的解决方案没有帮助,但是将GUI与刷新的值分开可能会有所帮助吗?
以下是一个例子:
#SingleInstance
#Persistent
Settimer, CheckIP, 500
CheckIP:
vCurrentaddr1 = %A_IPAddress1%
vCurrentaddr2 = %A_IPAddress2%
vCurrentaddr3 = %A_IPAddress3%
Gui, Add, Text, x2 y30 w120 h20 , IPv4 Addresses
Gui, Add, Edit, x2 y50 w120 h20 ReadOnly, %vCurrentaddr1%
Gui, Add, Edit, x2 y70 w120 h20 ReadOnly, %vCurrentaddr2%
Gui, Add, Edit, x2 y90 w120 h20 ReadOnly, %vCurrentaddr3%
; Generated using SmartGUI Creator 4.0
Gui, Show, x127 y87 h329 w414, Flickering App.
Return
GuiClose:
ExitApp
答案 0 :(得分:3)
使用GuiControl更新控件值而不重绘gui窗口
#SingleInstance
#Persistent
Gui, Add, Text, x2 y30 w120 h20 , IPv4 Addresses
Gui, Add, Edit, x2 y50 w120 h20 vMyEdit1 ReadOnly, %A_IPAddress1%
Gui, Add, Edit, x2 y70 w120 h20 vMyEdit2 ReadOnly, %A_IPAddress2%
Gui, Add, Edit, x2 y90 w120 h20 vMyEdit3 ReadOnly, %A_IPAddress3%
Gui, Show, x127 y87 h329 w414, Flickering App.
Settimer, CheckIP, 500
return
CheckIP:
GuiControl,, MyEdit1, %A_IPAddress1%
GuiControl,, MyEdit2, %A_IPAddress2%
GuiControl,, MyEdit3, %A_IPAddress3%
Return
GuiClose:
ExitApp
答案 1 :(得分:1)
#SingleInstance
#Persistent
Settimer, CheckIP, 500
Return
CheckIP:
vCurrentaddr1 = %A_IPAddress1%
vCurrentaddr2 = %A_IPAddress2%
vCurrentaddr3 = %A_IPAddress3%
IfWinNotExist, Flickering App. ahk_class AutoHotkeyGUI, %A_IPAddress1%
{
Gui, Add, Text, x2 y30 w120 h20 , IPv4 Addresses
Gui, Add, Edit, x2 y50 w120 h20 ReadOnly, %vCurrentaddr1%
Gui, Add, Edit, x2 y70 w120 h20 ReadOnly, %vCurrentaddr2%
Gui, Add, Edit, x2 y90 w120 h20 ReadOnly, %vCurrentaddr3%
; Generated using SmartGUI Creator 4.0
Gui, Show, x127 y87 h329 w414, Flickering App.
}
Return
GuiClose:
ExitApp
编辑: 添加WinText =%A_IPAddress1%