Page 1 of 1

print a BMP with a string in line

Posted: Fri Sep 12, 2008 10:48 am
by dbSoft
Hi in all
I would want your help
I have in a field of BDF File a string with address from a BMP picture
I want to print a situation in which
The place of picture c:\bmp\test 01. bmp and the picture
How does become this?

I thank,
With price Yannis

Re: print a BMP with a string in line

Posted: Fri Sep 12, 2008 11:07 am
by Patrick Mast
Hello,

Try this:

Code: Select all

#include "FiveWin.ch"

PROCEDURE Main()

   LOCAL cFile:="C:\Bitmaps\agua2.bmp"
   LOCAL oBMP,oPrn
   
   IF MsgYesNo("Print " + cFile + "?")
   
      DEFINE BITMAP oBmp FILE (cFile)
      
      PRINT oPrn
        PAGE
          oPrn:SayBitmap( 1, 1, cFile )
        ENDPAGE
      ENDPRINT
      
      MsgInfo(cFile + " sent to printer.")
      
   ENDIF   

RETURN 
You can assign cFile also from your database like cFile:=field->BITMAP

Patrick