LB Booster
Programming >> Language extensions >> LPRINT colored text
http://lbb.conforums.com/index.cgi?board=extensions&action=display&num=1445259630

LPRINT colored text
Post by Richard Russell on Oct 19th, 2015, 1:00pm

As the question has been asked elsewhere, here is how to LPRINT colored text in LBB:

Code:
    !printerDC = @prthdc%
    LPRINT "This is printed in black"
    CALLDLL #gdi32, "SetTextColor", printerDC as long, _
      hexdec("0000FF") as long, ret as long
    LPRINT "This is printed in red"
    CALLDLL #gdi32, "SetTextColor", printerDC as long, _
      hexdec("FF0000") as long, ret as long
    LPRINT "This is printed in blue"
    DUMP 

Richard.

Re: LPRINT colored text
Post by RNBW on Oct 19th, 2015, 2:27pm

Hi Richard

Thanks. That capability with LPRINT could be very useful.

Ray