Link to home
Start Free TrialLog in
Avatar of redbaron082997
redbaron082997

asked on

Print Preview Window

I want to create an invoice from my accounting program. The invoice will have a standard format, but the items will vary. What is the easiest way to preview, and then print? I am not sure what kind of window or items are necessary for a print preview. Any help would be appreciated. BTW, I am not interested in a report writer, etc.  I want to code it in the program. Thanks
Ronnie
Avatar of bin_huwairib
bin_huwairib

redbaron,

Basically, you can use the picture box control for this purpose but you have to be careful with font size and printing location because the screen resolution is different than the printer. I have a workable example that may help you but unfortunately I can't post it here because it is quit big. So if you can post your email address to send it to you.


Best regards
Bin Huwairib
The easiest way is to get the VS View control from VideoSoft.  It has print preview built in to a replacement and upgrade of the printer object.  They make good controls, you won't go wring on this one.  You can download a demofrom their web site.
Avatar of redbaron082997

ASKER

As I stated above, I am in need of code. The project I am working on is not a money making deal, and therfore spending anything on it besides my time would be pointless.

Bin, Yes please email me what you have. It may be closer to what I was looking for. Thanks
mailto:redbaron@flash.net
There is a great article (Q113236) in the MSKB at:
http://support.microsoft.com/support/kb/articles/Q113/2/36.asp
which explains how to add print preview to VB applications.

The article was written for VB3, but with a few minor modifications to the API declarations it will work for VB4/5.

I submit this as a comment.  If it solves your problem, let me know and I'll resubmit it as an answer.
redbaron,

I send an email to you regarding the Print Preview source code, did you get it?
I read a great capter dedicated to the subject "How to make a report without a report writer"

I think you may take a look on that book, it will solve your problem for good.

The book is named : "Advanced Microsoft Visual Basic", Author: "the Mandelbrot Set" Editor: "Microsoft Press"

They make a report writer with a rich format text box, it sounds great doesn't?
Please take a look on that book.

With kind regards
bin_huwairib:
Yes I got the file, and it does do exactly what I was asking. Have you implemented a field or template layout to be filled in? Just wondering, because I think that will be my next step on it.
bin_huwairib:
Post an answer to get your points!! Thanks
ASKER CERTIFIED SOLUTION
Avatar of bin_huwairib
bin_huwairib

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial