
Code: Select all | Expand
#include "fivewin.ch"
REQUEST DBFCDX
function Main()
local oWnd, oBrw, oFont, aImage
local nAlphaLevel := 64
USE CUSTOMER NEW VIA "DBFCDX"
DEFINE FONT oFont NAME "Calibri" SIZE 0,-15 BOLD
DEFINE WINDOW oWnd
oWnd:SetFont( oFont )
aImage := oWnd:ReadImage( "c:\fwh\bitmaps\pngs\2.png", , .t. )
@ 20,20 XBROWSE oBrw SIZE -20,-20 PIXEL OF oWnd ;
DATASOURCE "CUSTOMER" AUTOCOLS NOBORDER CELL LINES
WITH OBJECT oBrw
:lTransparent := .t.
:bPaintBack := < |Self|
FillRect( ::hDC, GetClientRect( ::hWnd ), ::oBrush:hBrush )
::DrawImage( aImage, ::DataRect():aRect, nil, nil, nAlphaLevel )
::lTransparent := .t.
return nil
>
//
:CreateFromCode()
END
ACTIVATE WINDOW oWnd CENTERED
RELEASE FONT oFont
PalBmpFree( aImage )
return nil