#include <GuiConstants.au3>
#include <WindowsConstants.au3>
#include <GuiIPAddress.au3>
Opt("GUIOnEventMode", 0)
$flag = ""
$Form1 = GUICreate("Form1", 494, 345, 192, 114)
$Label1 = GUICtrlCreateLabel("第一框:", 48, 64, 60, 28)
$Label2 = GUICtrlCreateLabel("IP框:", 48, 94, 60, 28)
$Input1 = GUICtrlCreateInput("", 128, 64, 169, 25)
$IPAddress1 = _GUICtrlIpAddress_Create($Form1, 128, 94, 169, 25, $WS_DISABLED)
_GUICtrlIpAddress_Set($IPAddress1, "0.0.0.0")
$IPAddress2 = _GUICtrlIpAddress_Create($Form1, 128, 124, 169, 25)
_GUICtrlIpAddress_Set($IPAddress2, "0.0.0.0")
GUISetState()
While 1
dq()
$msg = GUIGetMsg()
Switch $msg
Case $GUI_EVENT_CLOSE
Exit
EndSwitch
WEnd
Func dq()
If _GUICtrlIpAddress_Get($IPAddress2) <> "0.0.0.0" Then
_GUICtrlIpAddress_Set($IPAddress1, _GUICtrlIpAddress_Get($IPAddress2))
GUICtrlSetData($Input1, _GUICtrlIpAddress_Get($IPAddress2))
EndIf
EndFunc ;==>dq
|