Laiton's sample worked for me on FWH10.2, when I included a syswait on the code:
#include "FiveWin.ch"
Function Main()
Local oDlg
Define Dialog oDlg Title "Teste" From 0,0 To 300,450 Pixel
// Your code here ....
Activate Dialog oDlg Centered On Init FadeIn(oDlg) Valid FadeOut(oDlg)
Return nil
Function FadeIn(oDlg)
Local nNum
oDlg:Hide()
SetTransparency( oDlg, 0 )
oDlg:Show()
For nNum := 0 TO 255
SetTransparency( oDlg, nNum )
SysRefresh()
SysWait(.0004)
Next nNum
Return Nil
Function FadeOut(oDlg)
Local nNum
For nNum := 255 TO 0 STEP -1
SetTransparency( oDlg, nNum )
SysRefresh()
SysWait(.0004)
Next nNum
Return .t.
Function SetTransparency( oDlg, nValue )
SetWindowLong( oDlg:hWnd, -20, 524288 )
SetLayeredWindowATTributes( oDlg:hWnd, nRGB(255,0,255), nValue, 2 )
Return Nil
Windows 7 Ultimate
I don't know if the speed of the machine may influence the speed of the Fade, I don't have any slow machines to test on (FeedBack may be needed)...
Tested on a Core i5 3.33 GHz with 8GB RAM (Don't ask me why, when it seems that Windows can only manage 4GB)
=====>
Bayron Landaverry
xBasePHP.com
(215)2226600 Philadelphia,PA, USA
MayaBuilders@gMail.com
Guatemala
FWH25.06--Harbour 3.0.0--BCC7.7--UEstudio 10.10
Windows 10
FiveWin, One line of code and it's done...