Preview
Publicado: Jue May 12, 2005 8:23 pm
Hasta la Prerelease3 esto me funcionaba correctamente, ahora si quiero ver
el preview tengo que meter un msginfo().
Me casca en los puntos indicados con /////////CASCA////////
He tenido que poner el Msginfo que aparece.
Se que habeis cambiado algo. Pero aunque he leido LO NUEVO, no lo pillo.
Perdon una vez mas.
Paco V
//---------------------------------------------------------- ----------------
----
METHOD OTROVALEIM( oSender ) CLASS TForm9
LOCAL ofrmPreview, oFont, oPen, oBmp,oBmp1, oJpg, DIA
local n := 100
oFont := TFont():New()
oPen := TPen():New( PS_SOLID, 3, CLR_BLACK )
oBmp1 := TPicture():Load( "RENFE3" )
WITH OBJECT oFont
:cName := "Arial"
:nSize := 14
:lBold := .f.
END WITH
Printer:lPreview := .t.
Printer:StartDoc()
Printer:oCanvas:nMapMode := mmHIMETRICS
Printer:StartPage()
WITH OBJECT Printer:oCanvas
:oFont := oFont
:oPen := oPen
:DrawPicture( {50, 05, 400, 200}, oBMP1 ) //Imprime el Logo en la
cabecera
:TextOut( 1400, 100, "PARA EL TAXISTA")
CLR_BLUE)
:TextOut( 1700, 720, ::oDBMaskEdit2:value , CLR_BLUE)
:oFont:nSize := 12
:TextOut( 300, 820, "Observaciones para el Taxista: ", CLR_BLUE)
// Segunda parte del modelo
:oFont:nSize := 14
:oFont := oFont
:oPen := oPen
:DrawPicture( {50,1505, 400, 1700}, oBMP1 ) //Imprime el Logo en la
cabecera
:TextOut( 1400, 1600, "PARA LA BASE")
CLR_BLUE)
:TextOut( 250, 2120, "Desde: "+ ::oDBEdit6:value + " Hasta:
"+::oDBEdit7:value + Texto, CLR_BLUE)
:oFont:nSize := 12
:TextOut( 300, 2320, "Observaciones para el Taxista: ", CLR_BLUE)
:oFont:nSize := 10
:TextOut( 250, 2670, substr(::oDBMemo2:value,401,99), CLR_BLUE)
:oFont:nSize := 6
:TextOut( 1500, 2750, "Impreso el dia : " +dtoc(date())+ " a las
"+substr(time(),1,5), CLR_BLUE)
:oFont:nSize := 10
:lTransparent := .f.
:oFont:nSize := 14
:lTransparent := .t.
:nbkColor := CLR_WHITE
/////////Casca //////////////////////
:nMapMode := mmSIMULCHAR
:oFont:nSize := 12
:oFont:lBold := .f.
:nMapMode := mmHIMETRICS
:nbkColor := CLR_BLACK
////////Casca//////////////////////
END WITH
Printer:EndPage()
Printer:EndPage()
Printer:EndDoc()
Printer:Preview()
oFont:Destroy()
oBmp:Destroy()
MSGINFO("5")
/////// Para que pare y se ve el preview debajo////////////////
//oJpg:Destroy()
RETURN Nil
el preview tengo que meter un msginfo().
Me casca en los puntos indicados con /////////CASCA////////
He tenido que poner el Msginfo que aparece.
Se que habeis cambiado algo. Pero aunque he leido LO NUEVO, no lo pillo.
Perdon una vez mas.
Paco V
//---------------------------------------------------------- ----------------
----
METHOD OTROVALEIM( oSender ) CLASS TForm9
LOCAL ofrmPreview, oFont, oPen, oBmp,oBmp1, oJpg, DIA
local n := 100
oFont := TFont():New()
oPen := TPen():New( PS_SOLID, 3, CLR_BLACK )
oBmp1 := TPicture():Load( "RENFE3" )
WITH OBJECT oFont
:cName := "Arial"
:nSize := 14
:lBold := .f.
END WITH
Printer:lPreview := .t.
Printer:StartDoc()
Printer:oCanvas:nMapMode := mmHIMETRICS
Printer:StartPage()
WITH OBJECT Printer:oCanvas
:oFont := oFont
:oPen := oPen
:DrawPicture( {50, 05, 400, 200}, oBMP1 ) //Imprime el Logo en la
cabecera
:TextOut( 1400, 100, "PARA EL TAXISTA")
CLR_BLUE)
:TextOut( 1700, 720, ::oDBMaskEdit2:value , CLR_BLUE)
:oFont:nSize := 12
:TextOut( 300, 820, "Observaciones para el Taxista: ", CLR_BLUE)
// Segunda parte del modelo
:oFont:nSize := 14
:oFont := oFont
:oPen := oPen
:DrawPicture( {50,1505, 400, 1700}, oBMP1 ) //Imprime el Logo en la
cabecera
:TextOut( 1400, 1600, "PARA LA BASE")
CLR_BLUE)
:TextOut( 250, 2120, "Desde: "+ ::oDBEdit6:value + " Hasta:
"+::oDBEdit7:value + Texto, CLR_BLUE)
:oFont:nSize := 12
:TextOut( 300, 2320, "Observaciones para el Taxista: ", CLR_BLUE)
:oFont:nSize := 10
:TextOut( 250, 2670, substr(::oDBMemo2:value,401,99), CLR_BLUE)
:oFont:nSize := 6
:TextOut( 1500, 2750, "Impreso el dia : " +dtoc(date())+ " a las
"+substr(time(),1,5), CLR_BLUE)
:oFont:nSize := 10
:lTransparent := .f.
:oFont:nSize := 14
:lTransparent := .t.
:nbkColor := CLR_WHITE
/////////Casca //////////////////////
:nMapMode := mmSIMULCHAR
:oFont:nSize := 12
:oFont:lBold := .f.
:nMapMode := mmHIMETRICS
:nbkColor := CLR_BLACK
////////Casca//////////////////////
END WITH
Printer:EndPage()
Printer:EndPage()
Printer:EndDoc()
Printer:Preview()
oFont:Destroy()
oBmp:Destroy()
MSGINFO("5")
/////// Para que pare y se ve el preview debajo////////////////
//oJpg:Destroy()
RETURN Nil