FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour To antonio: Problem With Design a bitmap
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
To antonio: Problem With Design a bitmap
Posted: Fri Dec 09, 2016 11:18 AM
I must use a bitmap over another





I insert the bitmap simulate a Card into a oPanel because I need the space to insert reuler and other procedure

on this bitmap I insert tsay controls and Bitmap control
If I change the size of the bitmap "dip.bmp" ( the photo of customer) it make a black background and not refresh why ?

the minimal code of the test

Code (fw): Select all Collapse
#include "FiveWin.ch"


static oPanel


FUNCTION MAIN
LOCAL oDlg, oBrush

DEFINE BRUSH oBack FILE "badge006.bmp"
DEFINE DIALOG oDlg   SIZE 680,520 ;
TITLE "ID Card Identification maker"


            oPanel:=TPanel(32,18,232,322,oDlg)
            oPanel:oBrusH:= oBack



ACTIVATE DIALOG oDlg ;
ON INIT ( BuildControls( oDlg ) ,;
          PAINT_DATA(oPanel)   )

oBrush:End()

RETURN NIL
//---------------------------------------------------------//

FUNCTION PAINT_DATA(oWnd )
Local cfoto := "DIP.bmp"
Local oImg
Local oSay[10],oFont[10]
Local   cImpresa:= "<< Empresa >>"


@ 13, 12 BITMAP oImg FILENAME cFoto OF oWnd    SIZE 96,115  NOBORDER     DESIGN
oImg:lTransparent:=.t.



 DEFINE FONT oFont[1] NAME "Arial" SIZE 0,-24  // iMPRESA
 @ 3, 2 SAY oSay[1] PROMPT cImpresa    OF  oWnd  DESIGN SIZE 250, 24      TRANSPARENT    FONT oFont[1]
  


   RETURN NIL

//------------------------------------------------------------------//
static Function BuildControls( oDlg)
    local oMenu, oBar
  MENU oMenu  2007
   MENUITEM "&Information"
     MENU
       MENUITEM "&Informa......"
       SEPARATOR
       MENUITEM "&Exit" ACTION oDlg:End()
     ENDMENU

   MENUITEM "&?"    ACTION MsgAbout()
   ENDMENU


oDlg:SetMenu( oMenu )

DEFINE BUTTONBAR oBar OF oDlg    2007

DEFINE BUTTON OF oBar  FILENAME "WEBCAM.BMP"
SET MESSAGE OF  oDlg TO "test badge"  NOINSET   2007
  
return( 0 )
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: To antonio: Problem With Design a bitmap
Posted: Sat Dec 10, 2016 08:00 AM

You should resize the bitmap control too, if you resize the BMP file

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Re: To antonio: Problem With Design a bitmap
Posted: Sat Dec 10, 2016 11:12 AM

I not understood.. How?

oImg:refresh() ?
oDlg:update() ?

not run it is the same

Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: To antonio: Problem With Design a bitmap
Posted: Sat Dec 10, 2016 08:47 PM

Please try this:

oImg:SetSize( oImg:nWidth, oImg:nHeight )

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Re: To antonio: Problem With Design a bitmap
Posted: Sun Dec 11, 2016 12:21 PM

seem run ok with obj:sefocus()

Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com

Continue the discussion