Click to See Complete Forum and Search --> : printing


July 30th, 1999, 07:04 AM
Hello I posted a question about printing yesterday.
I got what I bleve to be a good answer but it was quite beond my programming understanding.

My reqierments are
printing text too paper
really really siple code (and perhaps even have the code explained a bit)
perhaps knowledge about siple setup of the page!
not too complicated I am still learning!!!!!!

Dr_Michael
July 30th, 1999, 08:17 AM
If you want to print the entire form then you must use:
Me.PrintForm
But let's look at this example of code:

Printer.Orientation = vbPRORLandscape
Printer.ScaleLeft = -((Printer.Width - me.Width) / 2)
Printer.ScaleTop = -((Printer.Height - me.Height) / 2)
Printer.Zoom = 130
me.PrintForm
Printer.EndDoc




First you set the orientation of the paper (landscape or portrait). Then I use the following two lines in order to achieve centering the print result on the paper both horizontically and vertically. Next step is to determine the size of the printing result. You are ready now to print the page. After printing that you must inform the printer that the document has finished. That's all!
NOTICE: 1) Not all kind of printers take care about all the lines you entered. I mean that although you set zoom=130%, maybe your printer ignore it!!! It's up to your drivers!
2) The printing result won't be of high quality
3) I think that it won't work (in some cases) to landscape, but only us portrait.
4) Prefer to use the code you mentioned to! It's better one. Trust me. My own experience talks... :-)


Michael Vlastos
Company MODUS SA
Development Department
Athens, Greece
Tel: +3-01-9414900