FWH1905: Watermark behind XBrowse

Post Reply
User avatar
nageswaragunupudi
Posts: 8017
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Contact:

FWH1905: Watermark behind XBrowse

Post 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
 
Regards

G. N. Rao.
Hyderabad, India
User avatar
Silvio.Falconi
Posts: 4956
Joined: Thu Oct 18, 2012 7:17 pm

Re: FWH1905: Watermark behind XBrowse

Post by Silvio.Falconi »

nice
I use : FiveWin for Harbour August 2020 (Revision) - Harbour 3.2.0dev (r1712141320) - Bcc7.30 - xMate ver. 1.15.3 - PellesC
Post Reply