Click to See Complete Forum and Search --> : Form Printing on Dot Matrix Printer


Anand Patwardhan
October 20th, 1999, 01:15 AM
I have a form having a few labels and text boxes.
I need to print this form on a dot matrix printer in text mode only (for speed). This printer does not suppport screen fonts. I am using a generic text printer driver for my default printer. When I use form.printform method I do not get the print. Can someone guide me how to do this ? (My customer doesnot allow me to use a page printer such as a laser printer for this purpose)

Thanks

Aaron Young
October 20th, 1999, 01:20 PM
The whole point of a TextOnly Driver/Printer Mode, is that it will print Only Text.

If you want to print a Graphic of the Form, you need to Install the Driver for the DotMatrix Printer and Print using that Driver. You can always set the Quality to Draft for increased speed.

Aaron Young
Analyst Programmer
adyoung@win.bright.net
aarony@redwingsoftware.com

kazooie21
October 20th, 1999, 02:11 PM
Here's something that may help you. Notice the last statement. This is the most important. You MUST enter this every time. It doesn't matter where you send the print focus. In your case, you would have to send it to a label or text box. You can do that. When you want to Print the form, under Print options: select "Current Project" and "Form as Text".

Private Sub cmdPrint_Click()
'hide command buttons before printing the form
cmdCalc.Visible = False
cmdPrint.Visible = False
cmdClear.Visible = False
cmdExit.Visible = False
'display command buttons after the form is printed
cmdCalc.Visible = True
cmdPrint.Visible = True
cmdClear.Visible = True
cmdExit.Visible = True
cmdClear.SetFocus

kazooie21

kazooie21
October 20th, 1999, 05:54 PM
Under the Print command Click event procedure, you have to type this line in:

Print.Form or PrintForm

Under one of the label or text boxes, you have to type this in:

cmdPrint.SetFocus

kazooie21

Anand Patwardhan
October 20th, 1999, 11:15 PM
Exactly ! I want to print the text on the form such as the one inside a text box and label only. My form does not have any graphic onto it neither do I want to print any graphic.

Any suggestions ?

Ravi Kiran
October 21st, 1999, 03:35 AM
How abt, write the contents of texts and labels to a text file and dump that tmp file to printer!!.

RK

Anand Patwardhan
October 21st, 1999, 11:03 PM
Yes ! That is what I have done eventually. My form print also needs some formatting. Various text fields are to be placed on to the paper at specific positions. So I had to make a text file template with tokens such as [#1#] to be replaced with actual data.

However, I want a method by which my graphic design in the form (only layout of fields and text within them; not the graphic content) would bet translated to its "text only" version. Maybe using top, left properties of text boxes being used for placement of fields etc.

(I know that the text mode stands outdated as such ; but my customer insists on low cost solution (esp. per copy cost) for daily printing of such a form in large quantities. Priting the same form in graphic mode is taking a lot of time. )

Thanks