To antonio: Problem With Design a bitmap

To antonio: Problem With Design a bitmap

Postby Silvio.Falconi » Fri Dec 09, 2016 11:18 am

I must use a bitmap over another


Image


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: Select all  Expand view
#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 November 2023 - January 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
User avatar
Silvio.Falconi
 
Posts: 7056
Joined: Thu Oct 18, 2012 7:17 pm

Re: To antonio: Problem With Design a bitmap

Postby Antonio Linares » Sat Dec 10, 2016 8:00 am

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

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42092
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: To antonio: Problem With Design a bitmap

Postby Silvio.Falconi » 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 November 2023 - January 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
User avatar
Silvio.Falconi
 
Posts: 7056
Joined: Thu Oct 18, 2012 7:17 pm

Re: To antonio: Problem With Design a bitmap

Postby Antonio Linares » Sat Dec 10, 2016 8:47 pm

Please try this:

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

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42092
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: To antonio: Problem With Design a bitmap

Postby Silvio.Falconi » 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 November 2023 - January 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
User avatar
Silvio.Falconi
 
Posts: 7056
Joined: Thu Oct 18, 2012 7:17 pm


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 70 guests