Functions
_Expand( $hWnd, $w_increase, $h_increase, $speed ) ; For this hWnd is the handle to the window to resize, w & h increases are the amounts to add to width and height, and speed should be a number between 1 and 10, 10 being the fastest and 1 being the slowest. _UnExpand( $hWnd, $w_decrease, $h_decrease, $speed ) ; All parameters are the same here except w & h decreases will be taken away from the GUI, not added.
It can be downloaded in ZIP format here: http://iwowprogramming.com/files/public/Resizing%20UDF.zip
The zip includes an example script. Also here is the UDF Source Code.
#cs ---------------------------------------------------------------------------- AutoIt Version: 3.3.0.0 Author: insignia96 Script Function: Used for resizing of windows. #ce ---------------------------------------------------------------------------- Func _Expand( $hWnd, $w_increase, $h_increase, $speed ) Local $increase[4] $current = WinGetPos( $hWnd ) $increase[0] = $w_increase $increase[1] = $w_increase $increase[2] = $increase[0] + $current[2] $increase[3] = $increase[1] + $current[3] $speed = $speed / 10 For $i = $current[2] To $increase[2] Step $speed WinMove( $hWnd, "", $current[0], $current[1], $i, $current[3] ) Next $current = WinGetPos( $hWnd ) For $i = $current[3] To $increase[3] Step $speed WinMove( $hWnd, "", $current[0], $current[1], $current[2], $i ) Next EndFunc Func _UnExpand( $hWnd, $w_decrease, $h_decrease, $speed ) Local $decrease[4] $current = WinGetPos( $hWnd ) $decrease[0] = $w_decrease $decrease[1] = $h_decrease $decrease[2] = $current[2] - $decrease[0] $decrease[3] = $current[3] - $decrease[1] $speed = $speed / 10 $speed = $speed * -1 For $i = $current[2] To $decrease[2] Step $speed WinMove( $hWnd, "", $current[0], $current[1], $i, $current[3] ) Next $current = WinGetPos( $hWnd ) For $i = $current[3] To $decrease[3] Step $speed WinMove( $hWnd, "", $current[0], $current[1], $current[2], $i ) Next EndFunc
The thing i used this for was making a GUI that expands downward, revealing advanced options, then is able to contract up.






