by Bayron » Wed Feb 02, 2011 2:07 pm
Laiton's sample worked for me on FWH10.2, when I included a syswait on the code:
- Code: Select all Expand view
#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
(215)2226600 Philadelphia,PA, USA
+(502)46727275 Guatemala
MayaBuilders@gMail.comFWH12.04||Harbour 3.2.0 (18754)||BCC6.5||UEstudio 10.10||
Windows 7 Ultimate
FiveWin, One line of code and it's done...