by karinha » Sat Apr 22, 2023 8:12 pm
- Code: Select all Expand view
// C:\FWH..\SAMPLES\NATTER2.PRG
#Include "Fivewin.ch"
#Include "Gif.ch"
STATIC oDlg, oSayNat
FUNCTION Main()
LOCAL oWnd
LOCAL oMenu
MENU oMenu
MenuItem "nOpacity" ACTION( Test_nOpacit() )
ENDMENU
DEFINE WINDOW oWnd MENU oMenu TITLE "Natter nOpcity"
ACTIVATE WINDOW oWnd CENTERED
RETURN NIL
FUNCTION Test_nOpacit()
LOCAL n := 0, oSay, oGif, oFont, nEnd := 1000000, cText := SPACE(50)
DEFINE FONT oFont NAME "Segoe UI Light" SIZE 0, -18 BOLD
DEFINE DIALOG oDlg FROM 0,0 TO 300,300 PIXEL TRUEPIXEL RESIZABLE ;
STYLE nOR(WS_POPUP, WS_THICKFRAME) COLOR CLR_BLACK, RGB(152, 251, 152) ;
TRANSPARENT
// FOR LOOPING
@ 120, 10 SAY oSay PROMPT "TEXTO" OF oDlg PIXEL UPDATE SIZE 120, 30 ;
FONT oFont CENTER COLOR CLR_BLACK, CLR_WHITE
@ 200, 10 SAY oSayNat VAR cText OF oDlg PIXEL UPDATE SIZE 250, 30 ;
FONT oFont CENTER COLOR CLR_BLACK, CLR_WHITE
oDlg:bLDblClick:={ || Chg_Tsp( oSayNat ) } // Double Click()
ACTIVATE DIALOG oDlg CENTERED ;
ON INIT( CrearGif( oDlg ), oDlg:nOpacity := 100 ) NOWAIT ;
VALID( n := nEnd, .T. )
WHILE n < nEnd
n++
oSay:SetText( Str( n ) )
IF n % 100 == 0
SYSREFRESH()
END
END
oDlg:End()
oFont:End()
RETURN NIL
FUNCTION CrearGif( oDlg )
LOCAL oGif
@ 1, 1 GIF oGif FILE "..\gifs\matrix.gif" OF oDlg SIZE 300, 150 ADJUST
RETURN NIL
FUNCTION Chg_Tsp( oSayNat )
LOCAL cTxtNat := SPACE(50)
// oDlg:nOpacity:=iif(valtype(oDlg:nOpacity)="N", NIL, 100)
oDlg:nOpacity := 180
// oDlg:Update()
// oDlg:Refresh()
cTxtNat := "Perfecto, Perfect, <ESC> Exit."
oSayNat:VARPUT( cTxtNat )
oSayNat:Refresh()
RETURN NIL
// FIN / END
Regards, saludos.
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341