#include <GUIConstantsEx.au3>
Local $hGUI = GUICreate("Example", 400, 400)
Local $plus = GUICtrlCreateButton("Увеличить счётчик", 10, 120, 185, 25)
Local $w = 25
Local $h = 25
Local $text = GUICtrlCreateLabel("0", 10, 30,$w,$h)
Local $text_size = 15
GUICtrlSetFont($text,$text_size)
GUISetState(@SW_SHOW, $hGUI)
While 1
Switch GUIGetMsg()
Case $GUI_EVENT_CLOSE
ExitLoop
Case $plus
Local $num = GUICtrlRead($text)
$num = $num +1
$text_size = $text_size +1
GUICtrlSetFont($text,$text_size)
GUICtrlSetData($text,$num)
$w = $w + 10
$h = $h + 10
GUICtrlSetPos($text,10,30,$w,$h)
EndSwitch
WEnd
|