How to Add Print Preview to VB (updated)

By | 2002-06-01

This code was originally coded using 16-bit Win API function calls and I switched to 32-bit… looks like I missed some in the first release. If you discover any OVERFLOW problems, it’s because of this fact. I think I got them all. Anyway, here’s the intro…
It would be ideal to have a generic print routine that could print to the printer or to the screen depending on what you pass it. This project shows you how to create printing routines that can print to the printer or to a picture box. This enables you to add print preview capabilities to your Visual Basic applications. Since there are several ways that you could implement print preview in your applications, this project describes one method that is easy to do in Visual Basic and works well.

Original Author: Vincent Lozada

Assumptions

Recently, I was on a quest to find some code to add print previewing in my VB apps and I came across this code from the MSDN web site. I found it very useful and I hope you do to. I modified the original code to conform to Windows 32 bit functions. For more details check out Article ID: Q113236

Attachments

FileUploadedSize
CODE_UPLOAD1705.zip9/3/2020 3:45:00 PM7192
Author: dwirch

Derek Wirch is a seasoned IT professional with an impressive career dating back to 1986. He brings a wealth of knowledge and hands-on experience that is invaluable to those embarking on their journey in the tech industry.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.