Obtient les positions de début et de fin de la plage de sélection en cours
#include <GuiSlider.au3>
_GUICtrlSlider_GetSel ( $hWnd )
$hWnd | ID/handle du contrôle Slider |
_GUICtrlSlider_SetSel, _GUICtrlSlider_SetSelEnd, _GUICtrlSlider_SetSelStart
#include <GUIConstantsEx.au3> #include <GuiSlider.au3> #include <MsgBoxConstants.au3> Example() Func Example() Local $aSel, $idSlider ; Crée une GUI GUICreate("Slider Get Sel", 400, 296) $idSlider = GUICtrlCreateSlider(2, 2, 396, 20, BitOR($TBS_TOOLTIPS, $TBS_AUTOTICKS, $TBS_ENABLESELRANGE)) GUISetState(@SW_SHOW) ; Obtient Sel _GUICtrlSlider_SetSel($idSlider, 10, 50) ; Définit Sel $aSel = _GUICtrlSlider_GetSel($idSlider) MsgBox($MB_SYSTEMMODAL, "Information", StringFormat("Sel: %d - %d", $aSel[0], $aSel[1])) ; Boucle jusqu'à ce que l'utilisateur quitte. Do Until GUIGetMsg() = $GUI_EVENT_CLOSE GUIDelete() EndFunc ;==>Example