Viktor1703
AutoIT Гуру
- Сообщения
- 1,535
- Репутация
- 413
Код:
#Include <GUIConstantsEx.au3>
#Include <WindowsConstants.au3>
Global Const $PBS_MARQUEE = 8
Global Const $PBM_SETMARQUEE = 0x0400 + 10
$hForm = GUICreate("Progress", 320, 90)
$hProgress = GUICtrlCreateProgress(10, 20, 300, 20, $PBS_MARQUEE)
$hButton = GUICtrlCreateButton("On", 110, 50, 75, 20)
GUICtrlSetState($hProgress, $GUI_HIDE)
GUISetState()
While 1
Switch GUIGetMsg()
Case $GUI_EVENT_CLOSE
Exit
Case $hButton
If GUICtrlRead($hButton) = "On" Then
GUICtrlSetData($hButton, "Off")
GUICtrlSetState($hProgress, $GUI_SHOW)
GUICtrlSendMsg($hProgress, $PBM_SETMARQUEE, 1, 100)
ElseIf GUICtrlRead($hButton) = "Off" Then
GUICtrlSetState($hProgress, $GUI_HIDE)
GUICtrlSetData($hButton, "On")
GUICtrlSendMsg($hProgress, $PBM_SETMARQUEE, 0, 0)
EndIf
EndSwitch
WEnd