Jump to content
rizaado

Function GUICtrlGetSize

Recommended Posts

Func GUICtrlGetSize($iControlID)
    Local $hControlID = GUICtrlGetHandle($iControlID)
    Local $aControlPos[2]
    $aControlPos[0] = ControlGetPos($hControlID, "", 0)[2] ;width
    $aControlPos[1] = ControlGetPos($hControlID, "", 0)[3] ;height
    Return $aControlPos
EndFunc ;==>GUICtrlGetSize

Purpose: Get the width and height of control.

My Purpose: Get the width and height of images(controls).

Edited by rizaado

Share this post


Link to post
Share on other sites

you can also use WinGetPos ;)

Func GUICtrlGetSize($iControlID)
    Local $hControl = GUICtrlGetHandle($iControlID), $aControlPos[2] = [WinGetPos($hControl)[2], WinGetPos($hControl)[3]]
    Return $aControlPos
EndFunc   ;==>GUICtrlGetSize

 


AutoIt 3.3.14.2 X86 - SciTE 3.6.0WIN 8.1 X64 - Other Example Scripts

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...