• Welcome to Powerbasic Museum 2020-B.
 

News:

Forum in repository mode. No new members allowed.

Main Menu

XPRINT IMAGELIST (new command)

Started by Robert Sarrazin, October 08, 2008, 05:34:25 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Robert Sarrazin

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 ::)

Robert Sarrazin

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

José Roca

 
Thanks for sharing it. I haven't still used the XPRINT functions.