i diffrent way to do the same as ResNullius did.. i hope this isnt flickering
#include <GuiConstants.au3>
Global $GuiX, $GuiY, $GuiW, $GuiH
$gui = GUICreate("My Gui")
$rollup = GUICtrlCreateButton("RollItUp", 50, 200, 100, 20);
GUISetState()
While 1
$Msg = GUIGetMsg()
Switch $Msg
Case $GUI_EVENT_CLOSE
Exit
Case $rollup
_RollUpGui($gui, 10)
ExitLoop
EndSwitch
WEnd
Func _RollUpGui($hWnd, $step, $delay = "default")
Local $GuiClientH, $MinH
Local $trans = 250
$GuiClientSize = WinGetClientSize($hWnd)
$GuiClientH = $GuiClientSize[1]
_GuiGetPos($hWnd)
$MinH = $GuiH - $GuiClientH
While $GuiW > 50;$GuiPos[3]
_GuiGetPos($hWnd)
If $GuiH > ($MinH) Then
$GuiH -= $step
$GuiY += $step / 2
Else
$GuiH = $GuiH
$GuiY = $GuiY
$GuiW -= $step
$GuiX += $step / 2
EndIf
WinMove($gui, "", $GuiX, $GuiY, $GuiW, $GuiH)
If $delay = "default" Then $delay = ($step * 2) + ($step / 2)
Sleep($delay)
;Trans section
WinSetTrans ( $gui, "", $trans)
if $trans > $step then
$trans -= $step/2
else
WinSetTrans ( $gui, "", 0)
endif
WEnd
;GUIDelete($gui)
;Exit
EndFunc ;==>_RollUpGui
Func _GuiGetPos($hWnd)
$GuiPos = WinGetPos($hWnd)
$GuiX = $GuiPos[0]
$GuiY = $GuiPos[1]
$GuiW = $GuiPos[2]
$GuiH = $GuiPos[3]
EndFunc ;==>_GuiGetPos
edit: oops posted wrong code..