函数参考


_GUICtrlIpAddress_Get

从IP地址控件返回一个IP地址

#Include <GuiIPAddress.au3>
_GUICtrlIpAddress_Get($hWnd)

参数

$hWnd 控件句柄

返回值

注意/说明

None.

相关

_GUICtrlIpAddress_Set, _GUICtrlIpAddress_GetEx

示例/演示


#include <GUIConstantsEx.au3>
#include <GuiIPAddress.au3>

$Debug_IP = False ; 检查传递给 IPAddress 函数的类名, 设置为真并使用另一控件的句柄可以看出它是否有效

_Main()

Func _Main()
    Local $hgui, $hIPAddress

    $hgui = GUICreate("IP Address Control Get (String) Example", 400, 300)
    $hIPAddress = _GUICtrlIpAddress_Create($hgui, 10, 10)
    GUISetState(@SW_SHOW)

    _GUICtrlIpAddress_Set($hIPAddress, "24.168.2.128")

    MsgBox(4160, "信息", "IP Address: " & _GUICtrlIpAddress_Get($hIPAddress))

    ; 等待用户关闭 GUI
    Do
    Until GUIGetMsg() = $GUI_EVENT_CLOSE
EndFunc   ;==>_Main