Link to home
Start Free TrialLog in
Avatar of JDL129
JDL129

asked on

Printing in VS2008 C#

I am upgrading my application from vb6 to vs2008 C# using Microsoft.VisualBasic.powerpacks.
How would I go about converting the following code to something that would print a form in C#.
Or is there a better way?

For Each prnPrinter In Printers
    If prnPrinter.DeviceName = gstrReportPrinter Then
        Set Printer = prnPrinter
        Exit For
    End If
Next
PrintForm

I have added: using Microsoft.VisualBasic.PowerPacks.Printing;

Thanks for your help!!
Jerry
ASKER CERTIFIED SOLUTION
Avatar of Tapan Pattanaik
Tapan Pattanaik
Flag of India image

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
Avatar of JDL129
JDL129

ASKER

tapanpattanaik!!!!!!!!
Thanks for the response!!  

I can't seem to find any of the examples that will print a form in C#.  All that I have found print the text from a text file.

Any other suggestions?

Thanks,
Jerry
Avatar of JDL129

ASKER

Thanks for the attempt!!!