|
-
Feb 19th, 2001, 03:49 PM
#1
Thread Starter
Addicted Member
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.
Last edited by P.S.W.; Feb 20th, 2001 at 12:28 AM.
-
Feb 19th, 2001, 04:45 PM
#2
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).
-
Feb 19th, 2001, 05:28 PM
#3
Thread Starter
Addicted Member
Sounds good, but...
How can I make a picture of the form?
-
Feb 20th, 2001, 12:32 AM
#4
Thread Starter
Addicted Member
Still haven't figured out how to do this...any body?
-
Feb 20th, 2001, 12:53 AM
#5
Frenzied Member
NXSupport - Your one-stop source for computer help
-
Feb 20th, 2001, 12:58 AM
#6
Thread Starter
Addicted Member
Err... next time read the first post please. I'm looking for alternatives to the .PrintForm method, i.e. API or some other procedure.
-
Feb 20th, 2001, 01:10 AM
#7
Frenzied Member
sorry
I've found the thing that wossname was talking about:
Code:
Printer.PaintPicture
but not yet sure how to use it
NXSupport - Your one-stop source for computer help
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|