Mann mann mann ... warum habe ich das in der Hilfe nicht gefunden ... hätte nicht nur bei den GUI Sachen suchen sollen.
Frei nach dem Motto "Jetzt wo ich weis wonach ich hätte suchen müssen finde ich es auch" ...
Danke, funktioniert 100%
Lösung:
Spoiler anzeigen
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 308, 438, 607, 124)
$Button1 = GUICtrlCreateButton("Button1", 40, 240, 225, 97)
$Label1 = GUICtrlCreateLabel("Label1", 48, 64, 212, 129)
GUICtrlSetBkColor(-1, 0x3399FF)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
Dim $aPosnSize = ControlGetPos($Form1,"",$Button1)
MsgBox(0,"Position Label1:","Button1:" & @CRLF & _
"X-Position: " & $aPosnSize[0] & @CRLF & _
"Y-Position: " & $aPosnSize[1] & @CRLF & _
"Breite : " & $aPosnSize[2] & @CRLF & _
"Höhe : " & $aPosnSize[3] & @CRLF)
Dim $aPosnSize = ControlGetPos($Form1,"",$Label1)
MsgBox(0,"Position Label1:","Label1:" & @CRLF & _
"X-Position: " & $aPosnSize[0] & @CRLF & _
"Y-Position: " & $aPosnSize[1] & @CRLF & _
"Breite : " & $aPosnSize[2] & @CRLF & _
"Höhe : " & $aPosnSize[3] & @CRLF)
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
EndSwitch
WEnd