You can make either one colour in a Window/Dialog totally transparent by setting oWnd:nSeeThroClr := <nColor>. You can set this to any colour even at run time and even change during runtime. In the above case we set the background color of oDlg as RGB(1,1,1) and set it as transparent colour (nSeeThroClr ). To cancel, set this DATA to nil.
Alternatively, you can set oWnd:nOpacity := <nLevel> // 0 to 255
// 0 is fully transparent (no use at all) and 255 is fully opaque ( not at all transparent)
This make entire window / dialog transparent/translucent depending on the value of nOpacity.
You can set this value and change it at any time during runtime also. You can make fade-in fade-out effects too.
These two features are built in the Widow class (apply to all windows and dialogs) from FWH10.12.
These features internally use the same function that Antonio posted above : trans(oDlg).
Dialog Transparent
- nageswaragunupudi
- Posts: 8017
- Joined: Sun Nov 19, 2006 5:22 am
- Location: India
- Contact:
Re: Dialog Transparent
Regards
G. N. Rao.
Hyderabad, India
G. N. Rao.
Hyderabad, India
Re: Dialog Transparent
A mixed solution of oWnd:nSeeThroClr and oWnd:nOpacity :
For the transparent-display < oWnd:nSeeThroClr > is used.
this must be disabled again for color / opaque-display

regards
Uwe
For the transparent-display < oWnd:nSeeThroClr > is used.
this must be disabled again for color / opaque-display

Code: Select all
REDEFINE RADIO oRadio2 VAR nTrLevel ID 740, 741, 742, 743 OF oFld:aDialogs[ 2 ] UPDATE ;
ON CHANGE TR_LEVEL( nTrLevel )
AEval( oRadio2:aItems, { | oRad | oRad:lTransparent := .T., ;
oRad:SetFont ( oFontsys ), ;
oRad:nClrText := 0 } )
STATIC FUNCTION TR_LEVEL( nTrLevel )
IF nTrLevel = 1 // full color
oWnd:nSeeThroClr := NIL // needed if 4 was selected before
aVal[5] := 255 // save opaque selection to var
oWnd:nOpacity := aVal[5]
ELSEIF nTrLevel = 2
oWnd:nSeeThroClr := NIL // needed if 4 was selected before
aVal[5] := 160 // Opacity
oWnd:nOpacity := aVal[5]
ELSEIF nTrLevel = 3
oWnd:nSeeThroClr := NIL // needed if 4 was selected before
aVal[5] := 80 // Opacity
oWnd:nOpacity := aVal[5]
ELSEIF nTrLevel = 4 // window color transparent
aVal[5] := 0
oWnd:nSeeThroClr := aVal[21] // color transparent
ENDIF
RETURN( NIL )
Uwe

Since 1995 ( the first release of FW 1.9 )
i work with FW.
If you have any questions about special functions, maybe i can help.
i work with FW.
If you have any questions about special functions, maybe i can help.