Transparent say over a bitmap

Post Reply
User avatar
Otto
Posts: 4470
Joined: Fri Oct 07, 2005 7:07 pm
Contact:

Transparent say over a bitmap

Post by Otto »

I would like to print a TRANSPARENT say over a BITMAP.
Is this possible?
Thanks in advance
Otto


Code: Select all

@ 0,0 BITMAP oBmp FILENAME CURDIR() + "\bmp\Clip5.bmp" PIXEL   of oDlg  SIZE 60,38 
@ 0,0 say oSaydemo PROMPT cText of oBmp font oFontMedium CENTERED   PIXEL  SIZE 50,12
oSaydemo:SetText(cText)
oSayDemo:refresh()
 
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org

********************************************************************
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: Transparent say over a bitmap

Post by Antonio Linares »

Otto,

Use oBmp:Say( ... ) instead of placing a SAY control on top of it.
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Otto
Posts: 4470
Joined: Fri Oct 07, 2005 7:07 pm
Contact:

Re: Transparent say over a bitmap

Post by Otto »

Hello Antonio,

thank you for your answer.
I tried yesterday with oBmp:Say before I tried using placing a SAY control on top.

Now as you suggested oBmp:Say I tried again but there are some problems:
I would like to use the oBmp as a kind of pointer to show where I have clicked.

1) I must hide and show the bmp
2) I have to clear the text

Attached I have my test code.
The problem is that you have to click twice to show the bitmap.

And could you please show me how to clear the oBmp:say or how to repaint the bmp without text?

Thanks in advance
Otto

Code: Select all

#include "FWCE.ch"

STATIC oBmp
STATIC oPanArt_WG

function Main()
   local oWnd

   DEFINE WINDOW oWnd TITLE "Bmp-Res"
 
  
    @ 5, 24 BITMAP oBmp FILENAME CURDIR() + "\users.bmp" SIZE 80,20 PIXEL   NOBORDER
        oBmp:hide()
  
   
   ACTIVATE WINDOW oWnd ;
      ON CLICK    neu(oWnd)

return nil


function neu(oWnd)
 
 oBmp:Say(0, 0, "*"+time(),   , , , .T., .T. )  
 oBmp:show()
  
return nil
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org

********************************************************************
Post Reply