-
Help! Printing from VB
I have a form that I'm using as a "report" that I want to print out.
I'm trying to make it so that the my app will print out the form onto a 5" X 8" index card (the form is appropriately sized), and I tried this code:
Printer.Orientation = vbPRORPortrait
Printer.Width = 7500
Printer.Height = 11500
Load Form1
Form1.PrintForm
Unload Form1
This works beautifully on my printer; it prints to the center of the page, so if I put an index card in the envelope feeder, it prints on it perfectly.
HOWEVER, I tried this program on another computer (which uses the same brand printer, incidentally), and it printed the form left-justified! It won't print on the index card correctly, because most of it gets cut off (you can only see part of the right edge).
Anybody know have any ideas on what is happening/what I can do to correct the problem? Any replies appreciated.
-
I'm not really surprised, my epson inkjet does unspeakable things to label controls when I try printform!
I think you should try the printer's .PaintPicture method instead, which gives stable results.
Alternatively, you could try delving into some API functions (BITBLT).
-
Sounds good, but...
How can I make a picture of the form?
-
Still haven't figured out how to do this...any body?
-
-
Err... next time read the first post please. I'm looking for alternatives to the .PrintForm method, i.e. API or some other procedure.
-
sorry
I've found the thing that wossname was talking about:
Code:
Printer.PaintPicture
but not yet sure how to use it