|
|
AddImage
Adds an Image to the Document collection. An Image can be added from another object, a file or from the ImageBank.
Syntax Object.AddImage (bAbsolute As Boolean, PictureFromObject As StdPicture, LoadFileName As String, ImageBankKey As String , bVAlignNextItem As Boolean , sKey As String, BeforeObject As Variant, AfterObject As Variant)
| Parameters | | bAbsolute | Sets whether the Item is Absolute - appearing on a specified page at a specified position, or TextFlow where the position is dependent on the other Items in the Document. | | PictureFromObject | Add a picture from a object e.g. PictureBox, Form or Image. | | LoadFileName | The filename of an Image to load. | | ImageBankKey | The Key identifying an Image already added to the ImageBank. | | bVAlignNextItem | The Vertical Alignment of the Item. When set to True the Top of the next item in the Document will be at the same vertical position as this Item. | | sKey | The Key to identify the Item. | | BeforeObject | The Index or Key of the Item the new Item should be placed before in the Document order. | | AfterObject | The Index or Key of the Item the new Item should be placed after in the Document order. |
Notes Only one item is required for either the PictureFromObject, LoadFileName or ImageBankKey. The ImageBank can be used for repeated images to lower the amount of resources the document uses.
Example ' Add an image from an Object
qPrint.Document.AddImage False, Picture1.Picture
' Add an image from a File
qPrint.Document.AddImage False, , "C:\My Documents\Picture.bmp"
' Add an image to the ImageBank
qPrint.Document.AddBankImage "Image1", Picture1.Picture
' Add an image to the document from the ImageBank
qPrint.Document.AddImage False, , , "Image1"
See Also: AbsoluteItems, DocumentItems, AddBankImage
|