Link to home
Start Free TrialLog in
Avatar of Kevin Kilgore
Kevin Kilgore

asked on

vb.net printing???

From what i've seen, there are two ways to print from a vb.net application:  
1.  using the PrintDocument funtion
2. using third party software called "PrintForm"

Printform just gets screenshots of the current window which is great for me when the resolution is large enough, but if not, the page gets cut off.  I am trying to figure out how to code a window using printdocument that will print out everything on an entire window including buttons, listboxes, labels, pictureboxes, everything....I've researched for hours to no avail.  Please help or point me in the right direction.  much appreciated!
Avatar of Scott McDaniel (EE MVE )
Scott McDaniel (EE MVE )
Flag of United States of America image

You can create reports in your project and print those. Doing that gives you a lot of formatting options, print options, etc. You basically create a report (an .rdlc file), add the ReportViewer control to a form, and then set the various properties of the ReportViewer to display your report.

Here's a tutorial:

https://code.msdn.microsoft.com/windowsdesktop/RDLC-example-dcdfd633

print out everything on an entire window including buttons, listboxes, labels, pictureboxes, everything
That's more of a screen capture, I'd think. .NET can do that, but it would capture only the images on the screen. If you have anything that must be scrolled, for example, you would not capture that.
This question needs an answer!
Become an EE member today
7 DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform.
View membership options
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.