I've really got to get a printer hooked back up to my PC sometime soonish, and then I can test it and sort out how to make it all work once again, Dimster. ;)
This poor old code was written back in Oct 2013, and disappeared with the old [abandoned, outdated and now likely malicious qb64 dot net website - don’t go there] forums went down, and I'll need some time to sort out where/how it is supposed to work once again, before I can really answer many questions for it. At the moment, I'm just happy to have it popping up the printer selection screen and letting me choose from the list of printers for my machine.
My initial thinking is that the best way to use this would be to incorporate it into a set of SUB/FUNCTIONS.
Currently, if I remember correctly, this only prints a single test line of code, and that's basically from these lines:
t = "Hello, world!"
IF 0 = TextOutA(pde.hDC, 0, 0, _OFFSET(t), LEN(t)) THEN PRINT "error"
If you want to print more text, you can use the TextOutA command to tell the printer to print something for you, such as:
t = "This would be the first line of text to print out!"
IF 0 = TextOutA(pde.hDC, 0, 0, _OFFSET(t), LEN(t)) THEN PRINT "error"
t = "This would be the second line of text to print out!"
IF 0 = TextOutA(pde.hDC, 0, 0, _OFFSET(t), LEN(t)) THEN PRINT "error"
t = "This would be the final line of text to print out!"
IF 0 = TextOutA(pde.hDC, 0, 0, _OFFSET(t), LEN(t)) THEN PRINT "error"
Substitute those lines in place of the original 2 there, and you should be able to print all 3 lines on a single sheet of paper sequentially. (Which is why I said making a SUB to handle that would probably be the best way to go...)
All of this was really more of a "proof of concept" set of code back in the day, just to mainly change printers and prove that we could interact with the windows API commands inside QB64, than something which was ever fully developed and fleshed out to make it super useful.
Now that it's been recovered, maybe somebody will be inspired by it to expand upon it and make it a truly useful library for us. (Heck, I might even do that, if I can just find a few extra hours in the day somewhere.) ;)