GAM Posted March 19, 2008 Share Posted March 19, 2008 Hi, Is there any function to have a button on progress bar? Neil Link to comment Share on other sites More sharing options...
Zedna Posted March 19, 2008 Share Posted March 19, 2008 #include <GUIConstants.au3> GUICreate("Test",220,100) ;, -1,-1, $WS_CAPTION, $WS_EX_TOPMOST) $progressbar = GUICtrlCreateProgress (10,15,200,20,$PBS_SMOOTH) $procent = GUICtrlCreateLabel ('0 %', 10,40,200,20,$SS_CENTER) $start = GUICtrlCreateButton ("Start",35,68,70,22) $stop = GUICtrlCreateButton ("Stop",115,68,70,22) GUICtrlSetState($stop,$GUI_DISABLE) GUISetState() $run = 0 $i = 0 While 1 $msg = GUIGetMsg() If $msg = $GUI_EVENT_CLOSE Then ExitLoop If $msg = $start Then $run = 1 GUICtrlSetState($start,$GUI_DISABLE) GUICtrlSetState($stop,$GUI_ENABLE) EndIf If $msg = $stop Then $run = 0 GUICtrlSetState($start,$GUI_ENABLE) GUICtrlSetState($stop,$GUI_DISABLE) EndIf If $run Then $i = $i + 1 If $i > 100 Then $i = 0 GUICtrlSetData ($progressbar,$i) GUICtrlSetData ($procent,$i & ' %') Sleep(100) EndIf Wend Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now