FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Possible, to show a animated Image in xBrowse ?
Posts: 4043
Joined: Wed Dec 19, 2007 06:40 PM
Possible, to show a animated Image in xBrowse ?
Posted: Wed Nov 07, 2012 12:33 PM
Hello,

could it be possible, to show a animated Image with xBrowse like
< Fade in> used to show a Logo, or any other effect ?
I can change a Image on Cellclick. It would be nice,
to show the new / changed Image with a visual effect.

The Image-display-effect needed in this function :

Code (fw): Select all Collapse
STATIC FUNCTION DrawCell ( oBrw1, oCol, hDC, cData, aRect, hBrush1 )
LOCAL oBrw := oCol:oBrw
LOCAL nTop := aRect[ 1 ]
LOCAL nLeft := aRect[ 2 ] 
LOCAL nBottom := aRect[ 3 ]
LOCAL nRight := aRect[ 4 ]
LOCAL nOld, nOld1, lAlpha, nZeroClr
LOCAL hBmp, hBmpO, nBmpW, nBmpH, nBmpTop, nBmpLeft

IF ! Empty( cData := oCol:Value() ) // note: cData is reassigned
    hBmp := FILoadImg( cData )
    nBmpH  := nCellSize 
    nBmpW := nCellSize + 2
    nBmpTop := nTop - 2
    nBmpLeft := nLeft - 4

    lAlpha := HasAlpha( hBmp )

    IF lAlpha .or. ! oCol:lBmpTransparent
        hBmpO := hBmp
        hBmp := ResizeImg( hBmpO, nBmpW, nBmpH )
        DeleteObject( hBmpO )
    ENDIF
    IF lAlpha
        ABPaint( hDC, nBmpLeft, nBmpTop, hBmp, oCol:nAlphaLevel(255) )
    ELSEIF oCol:lBmpTransparent
        nZeroClr := GetZeroZeroClr( hDC, hBmp )
        TransBmp( hBmp, nBmpWidth( hBmp ), nBmpHeight( hBmp ),;
                nZeroClr, hDC, nBmpLeft, nBmpTop, nBmpW, nBmpH )
     ELSE
        DrawBitmap( hDC, hBmp, nBmpTop, nBmpLeft )
    ENDIF

    DeleteObject( hBmp )
ENDIF

RETURN NIL


Best Regards
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.

Continue the discussion