#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <GUIListBox.au3>
#include <TabConstants.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 615, 438, 192, 124)
$Tab1 = GUICtrlCreateTab(64, 32, 481, 345)
$TabSheet1 = GUICtrlCreateTabItem("TabSheet1")
$Button1 = GUICtrlCreateButton("Button1", 120, 96, 137, 73)
$Button2 = GUICtrlCreateButton("Button2", 312, 96, 137, 73)
$List1 = GUICtrlCreateList("", 120, 200, 329, 149)
$TabSheet2 = GUICtrlCreateTabItem("TabSheet2")
$Button3 = GUICtrlCreateButton("Button3", 180, 196, 137, 73)
$Button4 = GUICtrlCreateButton("Button4", 180, 296, 137, 73)
$TabSheet3 = GUICtrlCreateTabItem("TabSheet3")
GUICtrlCreateTabItem("")
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
MsgBox('','','显示窗口')
GUICtrlSetState ($Tab1, $GUI_HIDE )
MsgBox('','','隐藏$Tab1,但是对应页面上的控件却没有隐藏')
GUICtrlSetState ($Tab1, $GUI_SHOW )
MsgBox('','','显示$Tab1')
ControlHide($Form1,'',$Tab1)
MsgBox('','','用ControlHide隐藏$Tab1,但依然是是对应页面上的控件没能隐藏')
GUICtrlDelete($Tab1)
MsgBox('','','用GUICtrlDelete则可以删除整个$Tab1,')
MsgBox('','','请教用什么方法可以令整个$Tab1及其在包含的控件隐藏,当然代码越简单越好')
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
EndSwitch
WEnd
大家运行一下这段代码,我在w732下$Button1 ,$Button2还是留在页面,无法隐藏