Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to create a print preview?

Status
Not open for further replies.

aliinal

Technical User
Jun 26, 2001
104
TR
I'm using standart printer object to create printouts. But i can not create a print preview.
How can i create a print preview by printer object? All others tips other than printer object are welcome :)

Thanks.
 
Thanks anyway!

I need more ideas please...
 
If you are using the printer object then probably the easiest solution is to create a VB form with a PictureBox object. Then use the same code (somewhat) to print to the PictureBox object that you use to print to the printer object by substituting object names.

There will be a few differences, like using the Cls method instead of the NewPage method, but beyond that it depends on how elegant you want the app to look.
 
What continually surprises me is that VB programmers have been crying out for print preview functionality since at least VB3 (prior to that we Vb people was jsut pleased that we could print easily, so we never questioned the limitations...)

For Vb3, Vb4, VB5, and VB6 we have been fobbed off by Microsoft with - as GlennB correctly advises - workarounds involving using a PictureBox.
 
I bought a component to do it. In my case I use VSPrinter, part of VSView by componentOne. Instead of printing to the VB Printer I now print to VSPrinter, this handles preview, zooming, printing etc. Unless your previewing requirement is small then this is a far better way. You have to spend a little money.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top