|
|
FormPrint
Creates a document from a standard Visual Basic form based on the controls on the form. The following controls can be included in the document:
TextBox The text value of the property will be included in the document. If the 'AutoHeight' property is set to True, the full contents of the TextBox will be included in the document even if it is not fully visible on the form.
Label The caption value of the Label will be added to the Document.
ComboBox The currently selected item in the ComboBox will be added to the document.
ListBox The items in the Listbox will be displayed in the document.
Option Button The method will determine the selected option and add the selected caption to the document. The Option's position in the document is based on the position of the first Option in the container. Options that have not been selected are not added to the document.
PictureBox Where the PictureBox includes an image, the content will be added to the document.
ImageBox Where the ImageBox includes an image, the content will be added to the document.
The method will try to layout the objects in the document to match the form's layout. Each control on the form / container included in the document is either a FormatBlock or ImageBlock. All of the document items are created as Absolute and are placed on Page 1 of the document. This means that the form can only be printed on one page.
Syntax Object.FormPrint (frmPrint As Object, ParentContain As Object, FormAlign As qePrinterAlign, InputBorder As Boolean , TopOffset As Single, AutoHeight As Boolean , ExcludeList As String)
| Parameters | | frmPrint | The Form containing the controls to create a Document. | | ParentContain | The Containing Parent object. This allows a section of a form to be used by only including the controls on a Frame, PictureBox etc. | | FormAlign | The Alignment of the Form on the Page. Where 'Justify' is selected, the controls will be stretch to fit the width of the page. If the content of a Form are larger than the Page width of the Document, the layout will be squeezed to fit on the Page. | | InputBorder | True or False value to determine whether a border is placed around TextBoxes, ListBoxes, Comboboxes and Pictures. | | TopOffset | The distance from the top of the page based on the ScaleMode of the Document. | | AutoHeight | Whether text items are forced to fit within the size of the control or are allowed to flow beyond their vertical boundary. | | ExcludeList | List of Controls that are not to be included in the document. Each item in the list should be prefixed by an asterisk '*' like:
"*Label1*Label2*Label3"
Items in a control array should be listed in the format '*Name/Index'. To exclude Label1(0) and Label1(1) use:
"*Label1/0*Label1/1"
|
Notes Each control has a Document Item created for it. In the case of PictureBoxes and ImageBoxes these are ImageBlocks. All text based controls have a FormatBlock. You can access these items using:
qPrint.AbsoluteItems("[ControlName]")
Where ControlName is the name of the original control on the form. If an item is part of a Control Array, the name is appended with /[Index].
See Also:
FormPrint_Update, qcFormatBlock.Absolute, qcFormatBlock.AbsPage, qcDocument.AbsoluteItems
|