Что нового

[Элементы GUI] координаты мыши на label

ferdeg

Новичок
Сообщения
5
Репутация
0
как сделать, чтобы показывал текущие координаты?
 

running-frag

why me?
Сообщения
441
Репутация
60
Код:
#include <GUIConstantsEx.au3>

Opt ('MustDeclareVars',		1)
Local $action
Local $gui 		= GUICreate ("coord", 100, 100)
Local $label 	= GUICtrlCreateLabel ("", 5, 5, 80, 25)

		GUISetState (@SW_SHOW, $gui)

Func _update ()
	Local $_coord = MouseGetPos ()
	GUICtrlSetData ($label, $_coord[0] &"x"& $_coord[1])
EndFunc

While True
	$action = GUIGetMsg ()
	_update ()
	
	If $action = $GUI_EVENT_CLOSE Then ExitLoop
WEnd



Добавлено:
Сообщение автоматически объединено:

навеяно этим топиком
выложил http://autoit-script.ru/index.php/topic,8058.0.html
 
Верх