Main
   Home
   About
   DiscussionBoard
Files
   About
   Submit
   Search
Downloads
   Action
   QB64
Links
   Link to us
QB45.org
[ Back to QB45 | FAQ | Search a message | Reply to this message | Back to messages ]

Laurent on 01/28/11 - 05:51:47

I'm sort of programming in QB 4.5 for years (Lotto-maniac) - I can't get a PRINTOUT any more since modern printers will not accept DOS commands - so
I'm on the lookout for a short routine, that I may
call and that will give me de PRINTSCREEN . Don't
know a thing about machine language or assembler.
For the record, yours truly is 88y old, living in
Antwerp-Belgium.
Thanks and greetings. 8778
laurent.huet@hotmail.com

Todd on 01/28/11 - 22:42:51

If I understand you correctly, you're trying to use the [u]OPEN "LPT1" FOR OUTPUT AS #1[/u] in QB?

In that case, you'd have to enable sharing of your local printer as some name (e.g. "sharedprinter") then run "net use lpt1 \\computername\\sharedprinter" from the command prompt to redirect data sent to LPT1 to be sent to your printer.

If you need clarification on how to do this, please let me know.

Laurent on 01/30/11 on 01/30/11 - 10:47:42

Thanks Todd,I'm struggling with a routine that won't
work TYPE RegType (ax,bx,cx,dx,Bp,s1,d1,flags AS INTEGER) END TYPE--
DECLARE SUB interrupt(intnum%, inreg AS RegType, outreg AS RegType
DECLARE SUB PrintScreen ()
SUB PrintScreen STATIC
DIM reg AS RegType
Interrupt 5, reg, reg
END SUB ---then I get messages like " was not declared " and this goes beyond my poor head !
(the reg.names ax,bx etc of course go on a separate line) Care to have a look at this pls ?

Cyperium on 01/30/11 - 15:24:23

In QB64 (QB 4.5 for modern computers) you can use LPRINT to print to a modern printer, there's also _PRINTIMAGE which you can use to print a image to the printer. All QB 4.5 commands are supported (some are not implemented yet though but will be in the future) and optimised for modern computers.

Here's the wiki if you want to learn more: http://qb64.net/wiki/index.php?title=Main_Page

Plasma on 01/31/11 - 01:00:31

Laurent, you need to start QB with the /L switch for that code to run. Even then I don't think it will do what you want, since calling INT 5 is just the equivalent of hitting the "print screen" key on your keyboard.

There are utilities (DOS2USB, DOSPRINT, DOSPRN, etc.) that will allow USB printers to appear as LPT to DOS programs.

tiveroel on 08/14/14 - 19:46:33

You mean I can print images such as line, curves and more complicated geometric figures (images) onto paper using a laser printer with programming codes QB4.5, QB7.1, etc on a WIN98, WIN2000, or WINXP machine by using the utilities DOS2USB, DOSPRINT, DOSPRN, etc which somehow employ LPT to DOS programs.

tiveroel on 08/14/14 - 19:47:29

You mean that a graphics image, eg line or curve, etc or more complex geometric figures can be printed by using QB4.5, QB7.1, FreeBasic, etc as output to my laser printer and creating such images by simply using LPT to any DOS prograrm w/DOS2USB, DOSPRINT, DOSPRN, etc using a WIN98, WIN XP, WIN 2000, or WIN 7 computer?

serendip on 12/31/14 - 09:44:38

the _PRINTIMAGE (as Cyperium said) can be used to print images to your printer. the HELP | KEYWORD INDEX | _PRINTIMAGE info within QB64v0.980 has two examples of image-to-printer which worked for me and i have a laser printer which (somehow) the examples found.

Reply to this message
Name:
Message:
Please enter this number:
No HTML allowed. You may use BB-code in your posting.
Members
Login
Register
QB45 Members
Member List