Spread WinForms 15
GrapeCity.Spreadsheet Assembly / GrapeCity.Spreadsheet.Drawing Namespace / IShapes Interface / AddPicture Method
The file from which the picture is to be created.
The file to link to.
To save the picture with the document.
The position (in pixels) of the upper-left corner of the picture relative to the upper-left corner of the document.
The position (in pixels) of the upper-left corner of the picture relative to the upper-left corner of the document.
The width of the picture, in pixels.
The height of the picture, in pixels.


In This Topic
AddPicture Method
In This Topic
Creates a picture from an existing file.
Syntax
'Declaration
 
Function AddPicture( _
   ByVal fileName As String, _
   ByVal linkToFile As Boolean, _
   ByVal saveWithDocument As Boolean, _
   ByVal x As Double, _
   ByVal y As Double, _
   Optional ByVal width As Double, _
   Optional ByVal height As Double _
) As IShape
 
'Usage
 
Dim instance As IShapes
Dim fileName As String
Dim linkToFile As Boolean
Dim saveWithDocument As Boolean
Dim x As Double
Dim y As Double
Dim width As Double
Dim height As Double
Dim value As IShape
 
value = instance.AddPicture(fileName, linkToFile, saveWithDocument, x, y, width, height)

Parameters

fileName
The file from which the picture is to be created.
linkToFile
The file to link to.
saveWithDocument
To save the picture with the document.
x
The position (in pixels) of the upper-left corner of the picture relative to the upper-left corner of the document.
y
The position (in pixels) of the upper-left corner of the picture relative to the upper-left corner of the document.
width
The width of the picture, in pixels.
height
The height of the picture, in pixels.

Return Value

The new picture.
See Also