How it works
The component implements System.ComponentModel.IExtenderProvider
which means that it extends each of the controls on the form to add a bunch of extra properties to that control. Then when the
are called it uses these
to lay out and print the form.
There are also
that control how the control prints or previews the form, and also the name of the document in the spool queue.
- First you need to download the source and compile it to a release dll. (Or download the .dll itself if you prefer)
- Then open the windows forms project to which you want to add form printing capabilities.
- Right click on the Toolbox and select the menu item "Choose Items"
- In the resulting dialog box press Browse and select the MCL Form Print Control
- Press OK and the component will be added to your toolbox
- Open the form that you want to add printing to in the designer
- Drag the component from the toolbox onto the designer
- Select the component and set the document properties
- Click on the component task link
- Click the task "Print Preview". It should bring up an empty print preview document.
- Select each control (text box, label etc) on your form that you are going to want to print. In the properties of the control there will be a set of extended properties that have been added by the MCL Form Print Component:
- Set the property Print on FormPrintComponent1 to true.
- Set the property Bounding rectangle to the rectangle area on the printed page where you want the control to print
- Set a border or background colour and select the component task "Preview" again to see where it is positioned
The following examples are a guide to using the various properties of the control -
please feel free to add any other examples you have
FAQ and Troubleshooting
If something isn't working as you expect have a look in the
page - if there's no answer there then maybe add an issue to the issue tracker.