Page 1 of 1

FWH1905: Watermark behind XBrowse

Posted: Tue Jun 04, 2019 11:33 am
by nageswaragunupudi
Image

Code: Select all

#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
 

Re: FWH1905: Watermark behind XBrowse

Posted: Tue Jun 04, 2019 1:51 pm
by Silvio.Falconi
nice