Link to home
Start Free TrialLog in
Avatar of Mr_Fulano
Mr_FulanoFlag for United States of America

asked on

How does Printing work in VB.NET2010 (Visual Studio 2010)?

Hi, I'm using VB.NET2010, WinForms (from the complete Visual Studio2010 package).

I've asked a few questions about "Printing" in VB.NET2010 here on this forum, but I'm still a bit puzzled how the PrintDocument, PrintPreview and other printing objects actually work. Can someone please explain the process of how to set-up printing on one of your Forms (start to finish), or better yet can you provide a tutorial (preferably a video, if available) that will explain the way these objects can be used to print the contents of different data objects, like Textboxes, DataGridViews, Reports, etc.

I've always been surprised how poorly Microsoft documents their printing mechanisms. Its almost like printing wasn't a necessary part of real-world applications. How do you provide the end-user with printed deliverables?  

Thank you,
Fulano
Avatar of Scott McDaniel (EE MVE )
Scott McDaniel (EE MVE )
Flag of United States of America image

The link I provided in your other question might also be useful here:

http://msdn.microsoft.com/en-us/library/ms251671(v=vs.80).aspx

It provides quite a few samples/examples, which show how to use various portions of the printing mechanism in VS.

In specific, this example seems to show how to directly print a report you've built:
http://msdn.microsoft.com/en-us/library/ms252091(v=vs.80).aspx
ASKER CERTIFIED SOLUTION
Avatar of SStory
SStory
Flag of United States of America 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
Here's something on printing datagridview
http://www.codeproject.com/KB/printing/datagridviewprinter.aspx

Either you must do it, or find code or controls to do it.  Like it's predecessor, (VB), VB.net allows you to do the basics, and allows you to do it far easier than before; however if you want things to be simpler you can extend functionality by purchasing third party controls.
Avatar of Mr_Fulano

ASKER

VERY, very good examples. Thanks you!!!