troubleshooting Question

Print Dialog and PrintPreviewDialog Question(s)

Avatar of rkulp
rkulpFlag for United States of America asked on
Visual Basic.NET
2 Comments1 Solution589 ViewsLast Modified:
I want to be able to put all my print routines into a separate module so any print routine can be called from several forms in the app. I can define:  

Public dlgPrinter as PrintDialog

in the module so that is no problem. However, I cannot define a PrintPreviewDialog in the module so this does not allow for print preview.  How can I include print preview since I cannot define the dialog? I may have missed an imports statement. The module has all of the following:

Imports System.IO
Imports Microsoft.Office.Interop  'For creating Word documents
Imports System.Drawing.Printing
Imports System.Text

Alternatively, there may be a way to use a form containing the PrintPreviewControl Control but I don't know how to do this in a module. A definitive "You can't do it, so stop trying!" would be a useful, but not welcome, response. A solution or work around would be better.
Wayne Taylor (webtubbs)

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 2 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 2 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros