Exporting from a form to printer

Apexprim8

Member
Joined
Oct 6, 2005
Messages
18
Location
Cheshire, United Kingdom
Programming Experience
Beginner
Hello all

I have a form that consists of multiple copies of a user control (made itself of a label, a textbox and twenty checkboxes).

What I'm trying to do is print this form. I don't want the actual form but the controls inside the form.

Can someone recommend a way to do this?

Many thanks

APX
 
i'm assuming you made properties for those controls, like Text for the textbox's Text property and series of Checked properties for the checkboxes so all you gotta do is just access your properties of your user control

then for printing used the PrintDocument control and simply place the info you need there
 
If you don't care for printing a report of your data as you want it layed out, but instead want to print an image of the form as it is displayed on screen you could have a look this control presented at The Code Project "A component that prints any Control, including ListViews, TreeViews, DataGridViews, Forms, etc..." http://www.codeproject.com/useritems/ControlPrint.asp This works for some in some cases, but the regular way to print content is to decide how you want the data printed and do that in the PrintDocument.PrintPage event with the usual graphical methods like DrawString and DrawImage etc. The problem with printing the form is that it usually consist not only of display of data content, but also user interface controls, and the data is most commonly presented in the fashion that you use user interface controls like scrollbars to display the data that exceed the visual bounds of the controls and forms.
 
Back
Top