Jump to content

Function GUICtrlGetSize


rizaado
 Share

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
Link to comment
Share on other sites

I haven't just run tidy. I am going to edit the post.

Before edit:

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

 

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...