#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <TabConstants.au3>
#include <WindowsConstants.au3>
Opt("GUIOnEventMode", 1)
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 846, 452, 246, 132)
GUISetOnEvent($GUI_EVENT_CLOSE, "_exit")
$Button1 = GUICtrlCreateButton("显示1", 16, 96, 75, 25)
GUICtrlSetOnEvent($Button1, "test")
$Button2 = GUICtrlCreateButton("返回", 16, 136, 75, 25)
GUICtrlSetOnEvent($Button2, "fanhui")
$Tab1 = GUICtrlCreateTab(160, 16, 673, 417)
GUICtrlCreateTabItem("")
$Label1 = GUICtrlCreateLabel("Label1", 288, 112, 412, 17)
$Button3 = GUICtrlCreateButton("界面1", 288, 136, 75, 25)
GUICtrlSetOnEvent($Button3, "jiemian1")
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
Sleep(100)
WEnd
Func test()
GUICtrlCreateTab(1, 1, 1, 1, $TCS_FOCUSNEVER)
$Label2 = GUICtrlCreateLabel("Label2", 288, 112, 412, 17)
$Button4 = GUICtrlCreateButton("界面2", 288, 136, 75, 25)
GUICtrlSetOnEvent($Button3, "jiemian2")
GUICtrlSetState($Tab1, $GUI_SHOW)
EndFunc ;==>test
Func fanhui()
GUICtrlCreateTab(1, 1, 1, 1, $TCS_FOCUSNEVER)
GUICtrlSetState($Tab1, $GUI_SHOW)
EndFunc ;==>test
Func jiemian1()
MsgBox(0, "", "界面1")
EndFunc ;==>test
Func jiemian2()
MsgBox(0, "", "界面2")
EndFunc ;==>test
Func _exit()
Exit
EndFunc ;==>_exit