Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Print text to Printer
Message
 
To
11/07/2000 12:37:05
General information
Forum:
Visual Basic
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00390619
Message ID:
00393801
Views:
19
>Open the printer like a file...
>Open "LPT1" For Output AS #1
> Print #1, Tab(10); "Hello"
> Print #1, Spc(3); "World
>Close #1
>
>If you put a comma at the end of the line, the printer will stay on the same line
>You can also, instead of the "LPT1", give the name of your printer or even a remote printer by specifing the path like: "Machine1\LaserJet"
>
>Hope this help..
>
>Patrice Merineau

Note to that if you want to get "Fancy" with bold or other types of controls, you will need to research the actual command for each printer. (Every Manufacturer has different code, and even within manufacturers, each printer! That's one of the beautiful helps of MS Windows - it abstracts all of that for you.)

Just a quick help that you may already know: If you use a semi-colon (;) it will place the text right next to each other. Commas (,) include a tab.

Ben Keene
www.icarz.com
Previous
Reply
Map
View

Click here to load this message in the networking platform