Advertisement

04.09.2008 at 01:09PM PDT, ID: 23309569
[x]
Attachment Details

Visual C# 2008 Printing a form with print preview and printer selection options

Asked by Karl66 in Microsoft Visual C#.Net, .Net Editors & IDEs, Microsoft Development

C# VS2008 Standard - Windows App - Printing question

I have a form in which I have a print button using the following line that works fine and prints the form:

printForm1.Print(this, Microsoft.VisualBasic.PowerPacks.Printing.PrintForm.PrintOption.ClientAreaOnly);

I would like to add print preview and the usual option box to slect a printer etc. It seems this is part of a VB powerpack and I cannot get it to work with the old 2005 C# printing options box code. Can anyone provide in the fewest lines of code a simple solution adding to the above code? Google has been a mixed bag so I would prefer code to a link to something pre-2008.

Thanks!
Karl66Start Free Trial
[+][-]04.09.2008 at 03:42PM PDT, ID: 21319860

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Microsoft Visual C#.Net, .Net Editors & IDEs, Microsoft Development
Sign Up Now!
Solution Provided By: emoreau
Participating Experts: 1
Solution Grade: B
 
 
[+][-]04.10.2008 at 10:04AM PDT, ID: 21326978

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04.10.2008 at 10:11AM PDT, ID: 21327059

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.10.2008 at 11:14AM PDT, ID: 21327702

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04.10.2008 at 12:06PM PDT, ID: 21328250

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 7-day free trial to view this Assisted Solution or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628