Function Reference


_GUICtrlIpAddress_SetRange

Sets the valid range for the specified field in the IP address control

#include <GuiIPAddress.au3>
_GUICtrlIpAddress_SetRange ( $hWnd, $iIndex [, $iLowRange = 0 [, $iHighRange = 255]] )

Parameters

$hWnd Handle to the control
$iIndex 0-based field index to which the range will be applied
$iLowRange [optional] Lower limit of the range
$iHighRange [optional] Upper limit of the range

Return Value

Success: True.
Failure: False.

Example

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

Example()

Func Example()
    Local $hGui, $hIPAddress

    $hGui = GUICreate("IP Address Control Set Range Example", 300, 150)
    $hIPAddress = _GUICtrlIpAddress_Create($hGui, 10, 10)
    GUISetState(@SW_SHOW)

    _GUICtrlIpAddress_Set($hIPAddress, "24.168.2.128")

    ; set range on 1st field
    _GUICtrlIpAddress_SetRange($hIPAddress, 0, 198, 200)

    ; Wait for user to close GUI
    Do
    Until GUIGetMsg() = $GUI_EVENT_CLOSE
EndFunc   ;==>Example