道理很简单,按钮2形成的控件listview挡住了按钮1形成的控件。#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")
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
Dim $Label1,$Button3,$Input1,$ListView
While 1
Sleep(100)
WEnd
Func Form1_1Close()
Exit
EndFunc
Func Button1Click()
GUICtrlDelete($ListView )
$Label1 = GUICtrlCreateLabel("这是测试标签", 160, 32, 76, 17)
$Button3 = GUICtrlCreateButton("测试", 168, 80, 75, 25, 0)
$Input1 = GUICtrlCreateInput("测试", 168, 120, 97, 21)
EndFunc
Func Button2Click()
GUICtrlDelete($Label1)
GUICtrlDelete($Button3)
GUICtrlDelete($Input1)
$ListView = GUICtrlCreateListView(' 测试', 136, 16, 217, 185)
EndFunc
|