English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

we need to create a program that could print the data using VB 6.0...is it possible...i'm still new at this and we are having a hard time finishing our project...thanks

2007-03-16 20:03:01 · 1 answers · asked by pips 1 in Computers & Internet Programming & Design

1 answers

The simplest way is to use the printer object which will use the default printer selected in the control panel.

PrinterFont = "courier new"
Printer.FontSize = 10
Printer.Print Tab(5); "Amount"
Printer.Print Tab(5); Format(15.5, "fixed")
Printer.Print Tab(5); Format(1.35, "fixed")
Printer.Print Tab(5); Format(145, "fixed")
Printer.EndDoc 'Sends Information to printer

Amount
15.50
1.35
145.00


I recommend using a fixed font like "Courier New" which has the same width for all characters. THis will help you line up your text by padding spaces in front of numbers so as to line up decimal points ect. A true type or proportional font has different widths for eact character making alignment a little more difficult to do.

2007-03-16 21:08:25 · answer #1 · answered by MarkG 7 · 0 0

fedest.com, questions and answers