#include <GUIConstantsEx.au3>
#include <GuiIPAddress.au3>
#include <TabConstants.au3>
#include <GuiTab.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 415, 299, 272, 229)
$Tab1 = GUICtrlCreateTab(8, 8, 393, 273)
$TabSheet1 = GUICtrlCreateTabItem("TabSheet1")
$IPAddress5 = _GUICtrlIpAddress_Create($Form1, 40, 48, 130, 21)
_GUICtrlIpAddress_Set($IPAddress5, "0.0.0.0")
$TabSheet2 = GUICtrlCreateTabItem("TabSheet2")
$IPAddress4 = _GUICtrlIpAddress_Create($Form1, 96, 72, 130, 21)
_GUICtrlIpAddress_Set($IPAddress4, "0.0.0.0")
$TabSheet3 = GUICtrlCreateTabItem("TabSheet3")
$IPAddress3 = _GUICtrlIpAddress_Create($Form1, 160, 96, 130, 21)
_GUICtrlIpAddress_Set($IPAddress3, "0.0.0.0")
$TabSheet4 = GUICtrlCreateTabItem("TabSheet4")
$IPAddress2 = _GUICtrlIpAddress_Create($Form1, 248, 160, 130, 21)
_GUICtrlIpAddress_Set($IPAddress2, "0.0.0.0")
$TabSheet5 = GUICtrlCreateTabItem("TabSheet5")
$IPAddress1 = _GUICtrlIpAddress_Create($Form1, 272, 240, 130, 21)
_GUICtrlIpAddress_Set($IPAddress1, "0.0.0.0")
GUICtrlCreateTabItem("")
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
iphide()
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
EndSwitch
WEnd
Func iphide()
If _GUICtrlTab_GetCurSel($Tab1)=0 Then
_GUICtrlIpAddress_ShowHide($IPAddress5, @SW_SHOW)
_GUICtrlIpAddress_ShowHide($IPAddress4, @SW_HIDE)
_GUICtrlIpAddress_ShowHide($IPAddress3, @SW_HIDE)
_GUICtrlIpAddress_ShowHide($IPAddress2, @SW_HIDE)
_GUICtrlIpAddress_ShowHide($IPAddress1, @SW_HIDE)
ElseIf _GUICtrlTab_GetCurSel($Tab1)=1 Then
_GUICtrlIpAddress_ShowHide($IPAddress5, @SW_HIDE)
_GUICtrlIpAddress_ShowHide($IPAddress4, @SW_SHOW)
_GUICtrlIpAddress_ShowHide($IPAddress3, @SW_HIDE)
_GUICtrlIpAddress_ShowHide($IPAddress2, @SW_HIDE)
_GUICtrlIpAddress_ShowHide($IPAddress1, @SW_HIDE)
ElseIf _GUICtrlTab_GetCurSel($Tab1)=2 Then
_GUICtrlIpAddress_ShowHide($IPAddress5, @SW_HIDE)
_GUICtrlIpAddress_ShowHide($IPAddress4, @SW_HIDE)
_GUICtrlIpAddress_ShowHide($IPAddress3, @SW_SHOW)
_GUICtrlIpAddress_ShowHide($IPAddress2, @SW_HIDE)
_GUICtrlIpAddress_ShowHide($IPAddress1, @SW_HIDE)
ElseIf _GUICtrlTab_GetCurSel($Tab1)=3 Then
_GUICtrlIpAddress_ShowHide($IPAddress5, @SW_HIDE)
_GUICtrlIpAddress_ShowHide($IPAddress4, @SW_HIDE)
_GUICtrlIpAddress_ShowHide($IPAddress3, @SW_HIDE)
_GUICtrlIpAddress_ShowHide($IPAddress2, @SW_SHOW)
_GUICtrlIpAddress_ShowHide($IPAddress1, @SW_HIDE)
ElseIf _GUICtrlTab_GetCurSel($Tab1)=4 Then
_GUICtrlIpAddress_ShowHide($IPAddress5, @SW_HIDE)
_GUICtrlIpAddress_ShowHide($IPAddress4, @SW_HIDE)
_GUICtrlIpAddress_ShowHide($IPAddress3, @SW_HIDE)
_GUICtrlIpAddress_ShowHide($IPAddress2, @SW_HIDE)
_GUICtrlIpAddress_ShowHide($IPAddress1, @SW_SHOW)
EndIf
EndFunc