Say Transparent...problems - ( Gradient Partial )
Posted: Mon Apr 22, 2013 2:59 pm
In recent versions, there are problems of Transparency, using the Function GradientFill(...).
There is another type of solution?
We would like to continue using Gradient partial screen!!!


Regards, Ale SB
There is another type of solution?
We would like to continue using Gradient partial screen!!!


Code: Select all | Expand
#include "fivewin.ch"
********************************************************************************
function Test_Gradient_Partial()
********************************************************************************
local aGrad1 := { { 0.50, nRGB( 219, 230, 244 ), nRGB( 207, 221, 239 ) }, ;
{ 0.50, nRGB( 201, 217, 237 ), nRGB( 231, 242, 255 ) } }
local aGrad2 := { { 1, nRGB( 100, 200, 100 ), nRGB( 255, 230, 200 ) } }
local oDlg, oFontA12B
DEFINE FONT oFontA12B NAME "Arial" SIZE 0,-12 BOLD ITALIC
DEFINE DIALOG oDlg TITLE "Test Gradient Partial"
oDlg:oFont := oFontA12B
oDlg:lTransparent := .T.
oDlg:nTop := 0
oDlg:nLeft := 0
oDlg:nBottom := 286
oDlg:nRight := 307
oDlg:nStyle := nOR( DS_MODALFRAME, DS_SYSMODAL, WS_POPUP, WS_CAPTION, WS_SYSMENU )
oDlg:SetColor( , nRGB( 255, 255, 25 ) )
@ 08, 04 SAY oSay PROMPT "GRADIENT PARTIAL TOP - GradientFill(...)" OF oDlg SIZE 145, 10 PIXEL TRANSPARENT update
@ 70, 04 SAY oSay VAR FWVERSION OF oDlg SIZE 145, 10 PIXEL TRANSPARENT update
@ 82, 04 SAY oSay PROMPT "oDlg:SetColor( , nRGB( 255, 255, 25 ) )" OF oDlg SIZE 145, 10 PIXEL TRANSPARENT update
@ 130, 04 SAY oSay PROMPT "GRADIENT PARTIAL BOTTOM - GradientFill(...)" OF oDlg SIZE 145, 10 PIXEL TRANSPARENT update
ACTIVATE DIALOG oDlg CENTERED ;
ON Paint ( GradientFill( oDlg:hDC, 0, 0, oDlg:nHeight/5, oDlg:nWidth, aGrad1 ),;
GradientFill( oDlg:hDC, oDlg:nBottom-40, 0, oDlg:nHeight, oDlg:nWidth, aGrad2 ) )
return nil
Regards, Ale SB