Jose's Read Only Forum 2023

General Category => General Discussion => Topic started by: Robert Sarrazin on October 08, 2008, 05:34:25 AM

Title: XPRINT IMAGELIST (new command)
Post by: Robert Sarrazin on October 08, 2008, 05:34:25 AM
Hi someone try the new command XPRINT IMAGELIST

What I try, my  program build a invoice and print.
I want to print the office logo on the top of that invoice. ???
file logo.bmp or logo.jpg or logo.gif anyone is perfect.
info:   my logo.bmp got 475 x 78


CASE %IDC_IMGBpr
       IF CBCTLMSG = %BN_CLICKED OR CBCTLMSG = 1 THEN
            LOCAL x as long
            LOCAL hLst AS LONG
            IMAGELIST NEW BITMAP 475, 78, 8, 1 TO hLst
            IMAGELIST ADD BITMAP hLst, "logo.bmp" TO x
            MSGBOX "result = " + STR$(x)

            ' I got result = 1 to the imagelist add...   seem ok

            '  I try a lot a possibility :(
            '  the last one not working again.

            XPRINT ATTACH DEFAULT
            XPRINT IMAGELIST (200,200), hLst,1,0,0
            XPRINT CLOSE
      END IF
END SELECT


I look to PowerBasic Forum and José Forum
nothing on that command...Include Bob samples. PB v 9.00.0085
Thank ::)
Title: Re: XPRINT IMAGELIST (new command)
Post by: Robert Sarrazin on October 10, 2008, 06:42:07 AM
find the solution to print bmp ::)

XPRINT RENDER "logo.bmp", (150, 100)- (1575,334)


my logo 475 x 78
475 x 3 = 1425 + 150 = 1575
78 x 3 = 234 + 100 = 334

you can strech or reduce the original

Thank  :o
Title: Re: XPRINT IMAGELIST (new command)
Post by: José Roca on October 10, 2008, 07:01:47 AM
 
Thanks for sharing it. I haven't still used the XPRINT functions.