函数参考


_GUICtrlSlider_SetRangeMin

Sets the minimum logical position for the slider

#Include <GuiSlider.au3>
_GUICtrlSlider_SetRangeMin($hWnd, $iMinimum)

参数

$hWnd Handle to the control
$iMinimum Minimum position for the slider

返回值

None.

注意/说明

If the current slider position is less than the new minimum, the _GUICtrlSlider_SetRangeMin function
sets the slider position to the new minimum value.

相关

_GUICtrlSlider_GetRangeMin, _GUICtrlSlider_SetRange, _GUICtrlSlider_SetRangeMax

示例/演示


#include <GUIConstantsEx.au3>
#include <GuiSlider.au3>

$Debug_S = False ; 检查传递给函数的类名, 设置为True并输出到一个控件的句柄,用于检查它是否工作

_Main()

Func _Main()
    Local $hSlider

    ; 创建 GUI
    GUICreate("Slider Set Range Min", 400, 296)
    $hSlider = GUICtrlCreateSlider(2, 2, 396, 20, BitOR($TBS_TOOLTIPS, $TBS_AUTOTICKS, $TBS_ENABLESELRANGE))
    GUISetState()

    ; Get Range Min
    MsgBox(4160, "信息", "Range Min: " & _GUICtrlSlider_GetRangeMin($hSlider))

    ; Set Range Min
    _GUICtrlSlider_SetRangeMin($hSlider, 20)

    ; Get Range Min
    MsgBox(4160, "信息", "Range Min: " & _GUICtrlSlider_GetRangeMin($hSlider))

    ; 循环直到用户退出
    Do
    Until GUIGetMsg() = $GUI_EVENT_CLOSE
    GUIDelete()
EndFunc   ;==>_Main