Question Print Windows Form

kieran82

Member
Joined
Feb 21, 2010
Messages
19
Programming Experience
Beginner
I want to find how to print a windows form. I have a invoice program and and have a print button called print form and want to print the windows form that im on?
 
Do you really want to print the form or do you actually want to print a representation of the data in the form? Think about it because the former is rarely the better option. Do you really want TextBoxes and Buttons and colours printed, or do you just want text and lines?
 
In that case, you need to create a PrintDocument, call its Print method and handle its PrintPage event, then draw whatever you want printed using GDI+. This should give you the basics:

A beginner's guide to printing in .NET
 
Back
Top