Что нового

[Окна, Диалоги] Созадния окна Progress

Сообщения
31
Репутация
-4
Люди помогите мне пожалуйста как создать окно прогресса в своей программе!
Вот мой скрипт:
Код:
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <ProgressConstants.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Progress", 265, 107, 298, 181)
$Progress1 = GUICtrlCreateProgress(8, 16, 249, 33)
$Button1 = GUICtrlCreateButton("Запуск", 8, 64, 249, 33)
GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif")
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
	$nMsg = GUIGetMsg()
	Switch $nMsg
		Case $GUI_EVENT_CLOSE
			Exit

	EndSwitch
WEnd

Мне нужно чтобы при нажатие кнопки запуск уменя проходила демонстративная загрузка!
Зарание спасибо!
 

madmasles

Модератор
Глобальный модератор
Сообщения
7,790
Репутация
2,322
БЕШАННЫЙ
Код:
#include <GUIConstantsEx.au3>

#region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Progress", 265, 107, 298, 181)
$Progress1 = GUICtrlCreateProgress(8, 16, 249, 33)
$Button1 = GUICtrlCreateButton("Запуск", 8, 64, 249, 33)
GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif")
GUISetState(@SW_SHOW)
#endregion ### END Koda GUI section ###

While 1
	$nMsg = GUIGetMsg()
	Switch $nMsg
		Case $GUI_EVENT_CLOSE
			Exit
		Case $Button1
			GUICtrlSetState($Button1, $GUI_DISABLE)
			GUICtrlSetData($Progress1, 0)
			For $i = 1 To 100
				GUICtrlSetData($Progress1, $i)
				Sleep(20)
			Next
			ToolTip('Ждем 2 секунды...', 0, 0)
			Sleep(2000)
			ToolTip('')
			GUICtrlSetData($Progress1, 0)
			GUICtrlSetState($Button1, $GUI_ENABLE)
	EndSwitch
WEnd
 
Автор
Б
Сообщения
31
Репутация
-4
А как сделать чтобы оно шкала прогресса не оставалась зеленой а возвращалась к своему исходному виду?
 
Верх