closing a window with a fade-out-effect, try this little function instead of a simple ownd:End()
As well I created some curtain-effects, closing dialogs / bars.
- Code: Select all Expand view
// aRect3 := GetSysmetrics( 1 ) // Screen-Height
// aRect4 := GetSysmetrics( 0 ) // Screen-Width
// instead of oWnd:End() => WND_CLOSE(oWnd, aRect[4], aRect[3])
FUNCTION WND_CLOSE(oWnd, nWidth, nHeight)
LOCAL nMinusW := nWidth / 30, nMinusH := nHeight / 30
LOCAL nT := 0, nL := 0, nW := nWidth, nH := nHeight
I := 1
FOR I := 1 TO 20
INKEY(0.01)
nT := nT + nMinusH
nL := nL + nMinusW
nW := nW - ( 2 * nMinusW )
nH := nH - ( 2 * nMinusH )
oWnd:Move( nT, nL, nW, nH , .f. ) // Top, left, width, height
NEXT
oWnd:End()
RETURN NIL
Best Regards
Uwe