Creates a Slider control for the GUI.
GUICtrlCreateSlider ( left, top [, width [, height [, style = -1 [, exStyle = -1]]]] )
To obtain the value of the control see GUICtrlRead().
To set or change information in the control see GUICtrlUpdate...() functions.
To update the bar position just use GUICtrlSetData().
To set the min and max value use GUICtrlSetLimit().
To combine styles with the default style use BitOR($GUI_SS_DEFAULT_SLIDER, newstyle, ... ).
To use the values specified above you must #include <SliderConstants.au3> in your script.
Default resizing is $GUI_DOCKAUTO size and position will occur.
GUICoordMode (Option), GUICtrlSetData, GUICtrlSetLimit, GUICtrlUpdate..., GUIGetMsg
#include <GUIConstantsEx.au3>
#include <MsgBoxConstants.au3>
Example()
Func Example()
GUICreate ("slider",220,100,100,200)
GUISetBkColor (0x00E0FFFF); will change background color
Local $idSlider1= GUICtrlCreateSlider (10,10,200,20)
GUICtrlSetLimit (-1,200,0); change min/max value
Local $idButton= GUICtrlCreateButton ("Value?",75,70,70,20)
GUISetState (@SW_SHOW )
GUICtrlSetData ($idSlider1,45); set cursor
Local $idMsg
; Loop until the user exits.
Do
$idMsg= GUIGetMsg ()
If $idMsg= $idButtonThen
MsgBox ($MB_SYSTEMMODAL,"slider1",GUICtrlRead ($idSlider1),2)
EndIf
Until $idMsg= $GUI_EVENT_CLOSE
EndFunc ;==>Example