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 )