本帖最后由 jycel 于 2009-5-5 17:20 编辑
在分页标签中使用了IP地址输入框,结果在每个分页中都显示出来了?请问怎么修改本分页中显示
解决方法
$Tab1 = GUICtrlCreateTab(8, 112, 500, 329)
GUICtrlSetResizing(-1, $GUI_DOCKWIDTH+$GUI_DOCKHEIGHT)
$TabSheet1 = GUICtrlCreateTabItem("程序说明")
$Pic1 = GUICtrlCreatePic("logo.jpg", 16, 144, 481, 289, 0)
$TabSheet2 = GUICtrlCreateTabItem("即时信息")
$Checkbox2 = GUICtrlCreateCheckbox("开启即时消息", 16, 144, 121, 17)
$Edit2 = GUICtrlCreateEdit("", 16, 172, 481, 161, BitOR($ES_AUTOVSCROLL,$ES_AUTOHSCROLL,$ES_WANTRETURN,$WS_VSCROLL))
GUICtrlSetData(-1, "Edit1")
$Group3 = GUICtrlCreateGroup("发送范围", 11, 339, 481, 97)
$Radio3 = GUICtrlCreateRadio("单客户机", 27, 363, 81, 17)
$Radio4 = GUICtrlCreateRadio("群发客户", 27, 403, 89, 25)
$Label2 = GUICtrlCreateLabel("-", 259, 411, 7, 17)
$IPAddress4 = _GUICtrlIpAddress_Create($Form1, 131, 363, 121, 22, -1, $WS_EX_STATICEDGE)
_GUICtrlIpAddress_Set($IPAddress4, "192.168.0.1")
$IPAddress5 = _GUICtrlIpAddress_Create($Form1, 131, 403, 121, 22, -1, $WS_EX_STATICEDGE)
_GUICtrlIpAddress_Set($IPAddress5, "192.168.0.1")
$IPAddress6 = _GUICtrlIpAddress_Create($Form1, 275, 403, 121, 22, -1, $WS_EX_STATICEDGE)
_GUICtrlIpAddress_Set($IPAddress6, "192.168.0.255")
$Button17 = GUICtrlCreateButton("发送消息", 411, 371, 73, 57, $WS_GROUP, $WS_EX_STATICEDGE)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$TabSheet3 = GUICtrlCreateTabItem("分页3")
$TabSheet4 = GUICtrlCreateTabItem("分页4")
$TabSheet5 = GUICtrlCreateTabItem("分页5")
$TabSheet6 = GUICtrlCreateTabItem("分页6")
$TabSheet7 = GUICtrlCreateTabItem("分页7")
$TabSheet8 = GUICtrlCreateTabItem("分页8")
GUICtrlCreateTabItem("")
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
$n1=GUICtrlRead($Tab1)
if $n1=0 Then
_GUICtrlIpAddress_ShowHide ($IPAddress4, @SW_HIDE)
_GUICtrlIpAddress_ShowHide ($IPAddress5, @SW_HIDE)
_GUICtrlIpAddress_ShowHide ($IPAddress6, @SW_HIDE)
Elseif $n1=1 Then
_GUICtrlIpAddress_ShowHide ($IPAddress4, @SW_SHOW)
_GUICtrlIpAddress_ShowHide ($IPAddress5, @SW_SHOW)
_GUICtrlIpAddress_ShowHide ($IPAddress6, @SW_SHOW)
ElseIf $n1=2 Then
_GUICtrlIpAddress_ShowHide ($IPAddress4, @SW_HIDE)
_GUICtrlIpAddress_ShowHide ($IPAddress5, @SW_HIDE)
_GUICtrlIpAddress_ShowHide ($IPAddress6, @SW_HIDE)
ElseIf $n1=3 Then
_GUICtrlIpAddress_ShowHide ($IPAddress4, @SW_HIDE)
_GUICtrlIpAddress_ShowHide ($IPAddress5, @SW_HIDE)
_GUICtrlIpAddress_ShowHide ($IPAddress6, @SW_HIDE)
ElseIf $n1=4 Then
_GUICtrlIpAddress_ShowHide ($IPAddress4, @SW_HIDE)
_GUICtrlIpAddress_ShowHide ($IPAddress5, @SW_HIDE)
_GUICtrlIpAddress_ShowHide ($IPAddress6, @SW_HIDE)
ElseIf $n1=5 Then
_GUICtrlIpAddress_ShowHide ($IPAddress4, @SW_HIDE)
_GUICtrlIpAddress_ShowHide ($IPAddress5, @SW_HIDE)
_GUICtrlIpAddress_ShowHide ($IPAddress6, @SW_HIDE)
ElseIf $n1=6 Then
_GUICtrlIpAddress_ShowHide ($IPAddress4, @SW_HIDE)
_GUICtrlIpAddress_ShowHide ($IPAddress5, @SW_HIDE)
_GUICtrlIpAddress_ShowHide ($IPAddress6, @SW_HIDE)
ElseIf $n1=7 Then
_GUICtrlIpAddress_ShowHide ($IPAddress4, @SW_HIDE)
_GUICtrlIpAddress_ShowHide ($IPAddress5, @SW_HIDE)
_GUICtrlIpAddress_ShowHide ($IPAddress6, @SW_HIDE)
ElseIf $n1=8 Then
_GUICtrlIpAddress_ShowHide ($IPAddress4, @SW_HIDE)
_GUICtrlIpAddress_ShowHide ($IPAddress5, @SW_HIDE)
_GUICtrlIpAddress_ShowHide ($IPAddress6, @SW_HIDE)
EndIf
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
EndSwitch
WEnd
|