*** ------------------------- Form Init with thisform doDefault() * Only for top-level forms If .ShowWindow = 2 * Win2000 and up If Val( Os(3) ) >= 5 DECLARE SetWindowLong IN Win32Api INTEGER, INTEGER, INTEGER DECLARE SetLayeredWindowAttributes IN Win32Api INTEGER, STRING, INTEGER, INTEGER DECLARE GetWindowLong IN Win32Api INTEGER, INTEGER EndIf If .visible .Show() EndIf EndIf EndWith *** ------------------------- Form Show LPARAMETERS nStyle * Invisible this.Fade( 0 ) this.Visible = .t. * Fade IN this.Fade( +1 ) *** ------------------------- Form Hide DoDefault() * Fade OUT this.Fade( -1 ) *** ------------------------- Form Destroy With this DoDefault() If .Visible and .ShowWindow = 2 .Fade( -1 ) EndIf endwith *** ------------------------- Form Fade (custom method) Lparameters tnMode as Number && +1 fade in, -1 fade out, 0 invisible With thisform * For Top-level form on Win2000 and up If .ShowWindow = 2 and Val( Os(3) ) >= 5 DECLARE Sleep IN Win32API INTEGER nMilliseconds If Empty( tnMode ) SetWindowLong( .hWnd, -20, 0x00080000 ) SetLayeredWindowAttributes( .hWnd, 0, 0, 2 ) Else Local lnOpacity, lnFrom, lnTo, lnStep lnFrom = Iif( tnMode > 0, 0, 255 ) lnTo = Iif( tnMode > 0, 255, 0 ) lnStep = tnMode * 25 * Fade IN/OUT for lnOpacity = lnFrom to lnTo step lnStep Sleep( 100 ) SetWindowLong( .hWnd, -20, 0x00080000 ) SetLayeredWindowAttributes( .hWnd, 0, lnOpacity, 2 ) Next SetWindowLong( .hWnd, -20, 0x00080000 ) SetLayeredWindowAttributes( .hWnd, 0, lnTo, 2 ) EndIf endif endwithEspero que te sirva.