问个很菜的问题,关于gui的刷新
$Form1 = GUICreate("test", 412, 104, 192, 114)$Input1 = GUICtrlCreateInput("", 72, 40, 65, 21)
$Input2 = GUICtrlCreateInput("", 184, 40, 65, 21)
$Input3 = GUICtrlCreateInput("", 296, 40, 89, 21)
$Label1 = GUICtrlCreateLabel("加", 152, 40, 16, 17)
$Label2 = GUICtrlCreateLabel("等于", 256, 40, 28, 17)
GUISetState(@SW_SHOW)
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case -3
Exit
Case $Form1
Case $Input1
Case $Input2
Case $Input3
EndSwitch
WEnd
如图中$Input3里的数据如何才能随时刷新,即当用户向输入$Input1和$Input2输入数字时立即显示出来.
本人的处女贴,先谢谢肯帮忙的各位善长仁兄
[ 本帖最后由 大菜 于 2009-2-1 04:33 编辑 ]
Case $Input1
guictrlsetdata($input3,guictrlread($input1)+guictrlread($input2))
Case $Input2
guictrlsetdata($input3,guictrlread($input1)+guictrlread($input2))
应该是这样吧
$Form1 = GUICreate("test", 412, 104, 192, 114)
$Input1 = GUICtrlCreateInput("", 72, 40, 65, 21)
$Input2 = GUICtrlCreateInput("", 184, 40, 65, 21)
$Input3 = GUICtrlCreateInput("", 296, 40, 89, 21)
$Label1 = GUICtrlCreateLabel("加", 152, 40, 16, 17)
$Label2 = GUICtrlCreateLabel("等于", 256, 40, 28, 17)
GUISetState(@SW_SHOW)
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case -3
Exit
EndSwitch
guictrlsetdata($input3,guictrlread($input1)+guictrlread($input2))
WEnd
收藏起来慢慢学习 讚...可以拿來寫 武將參數換算
好文...感謝ceoguang 已解决,thk all
页:
[1]