#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
Opt("GUIOnEventMode", 1)
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 362, 247, 192, 124)
GUISetOnEvent($GUI_EVENT_CLOSE, "Form1_1Close")
$Button1 = GUICtrlCreateButton("Button1", 16, 32, 75, 25, 0)
GUICtrlSetOnEvent($Button1, "Button1Click")
$Button2 = GUICtrlCreateButton("Button2", 16, 88, 75, 25, 0)
GUICtrlSetOnEvent($Button2, "Button2Click")
$Label1 = GUICtrlCreateLabel("这是测试标签", 160, 32, 76, 17)
$Button3 = GUICtrlCreateButton("测试", 168, 80, 75, 25, 0)
$Input1 = GUICtrlCreateInput("测试", 168, 120, 97, 21)
$ListView = GUICtrlCreateListView(' 测试', 136, 16, 217, 185)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
Sleep(100)
WEnd
Func Form1_1Close()
Exit
EndFunc
Func Button1Click()
GUICtrlSetState ( $ListView, $GUI_HIDE )
GUICtrlSetState ( $Label1, $GUI_SHOW )
GUICtrlSetState ( $Button3, $GUI_SHOW )
GUICtrlSetState ( $Input1, $GUI_SHOW )
EndFunc
Func Button2Click()
GUICtrlSetState ( $Label1, $GUI_HIDE )
GUICtrlSetState ( $Button3, $GUI_HIDE )
GUICtrlSetState ( $Input1, $GUI_HIDE )
GUICtrlSetState ( $ListView, $GUI_SHOW )
EndFunc
并不是不能正常显示,而是你第二个窗口出现的控件把第一个窗口给档住了,所以看不到。方法很多种,要看你自己怎么用了。 |