rizaado Posted June 30, 2015 Share Posted June 30, 2015 (edited) 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 ;==>GUICtrlGetSizePurpose: Get the width and height of control.My Purpose: Get the width and height of images(controls). Edited June 30, 2015 by rizaado Link to comment Share on other sites More sharing options...
Valuater Posted June 30, 2015 Share Posted June 30, 2015 EndFunc ;==>GUICtrlGetPos ??8) Link to comment Share on other sites More sharing options...
rizaado Posted June 30, 2015 Author Share Posted June 30, 2015 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 More sharing options...
wakillon Posted June 30, 2015 Share Posted June 30, 2015 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.0 - WIN 8.1 X64 - Other Example Scripts Link to comment Share on other sites More sharing options...
rizaado Posted July 1, 2015 Author Share Posted July 1, 2015 Divide GUICtrlGetSize into two functions - "getWidth" and "getHeight"! It is better solution. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now