*** Valdmir de Oliveira Lopes *** valdmir@globo.com.br setblink(.f.) setcolor("n+/w") cls setcolor("w+/b") @ 23,70 say "GOSTOU" color "w+/w" janela(10,10,22,70,"n/gr+*") @ 21,60 say "GOSTOU" color "n/gr+*" janela(10,10,20,60,"n/r*") @ 16,35 say "GOSTOU" color "w+/r+*" janela(5,5,15,35,"n/g") @ 11,20 say "GOSTOU" color "w+/g" janela(1,1,10,20,"n/b") @ 06,08 say "GOSTOU" color "w+/b" inkey(0) setcolor("w/n") cls FUNCTION JANELA(li,ci,lf,cf,cor) setcolor(cor) @ li,ci clear to lf,cf @ li,ci to lf,cf sombra(li,ci,lf,cf) return .t. FUNCTION SOMBRA(_Li, _Ci, _Lf, _Cf) Local Tela1, Tela2, Tela3, Tela4 Tela3 := savescreen(_Li + 1, _Cf + 1, _Lf + 1, _Cf + 2) Tela4 := savescreen(_Lf + 1, _Ci + 2, _Lf + 1, _Cf + 2) for Tela1:= 2 to len(Tela3) step 2 Tela2:= shadow(asc(substr(Tela3,Tela1,1))) Tela3:= stuff(Tela3,Tela1,1,Tela2) end for Tela1:= 2 to len(Tela4) step 2 Tela2:= shadow(asc(substr(Tela4, Tela1,1))) Tela4:= stuff(Tela4,Tela1,1,Tela2) end restscreen(_Li + 1, _Cf + 1, _Lf + 1, _Cf + 2, Tela3) restscreen(_Lf + 1, _Ci + 2, _Lf + 1, _Cf + 2, Tela4) return NIL FUNCTION SHADOW(_Car) Local Var1, Var2, Var3 Var1:= _Car % 16 Var2:= (_Car - Var1) / 16 Var3:= {0, 0, 8, 8, 0, 8, 0, 8, 0, 1, 2, 3, 4, 5, 6, 7} Var1:= Var3[Var1 + 1] Var2:= Var3[Var2 + 1] return Chr(16 * Var2 + Var1)