HeaderPane
Main
Hide
Share Link
Print

LoadImage Method, SftPictureObject Object

Loads an image from a file as a GDI+ image.

Syntax

VBobject.LoadImage(ByVal Filename As String, ByVal UseEmbeddedColorManagement As Boolean)

object

A SftPictureObject object.

Filename

The name of the file containing a GDI+ image.

UseEmbeddedColorManagement

Defines whether the Image object applies color correction according to color management information that is embedded in the image file. Embedded information can include International Color Consortium (ICC) profiles, gamma values, and chromaticity information. True to enable color correction, False otherwise.

Comments

The LoadImage method loads an image from a file as a GDI+ image.

The image object is owned by the control and will be deleted when it is no longer used.

Example

This example adds an image, loaded from a file, to the first tab. The image is then copied to the second tab.

Private Sub Form_Load()
     With SftTabs1.Direct
         .Tab(0).Image.LoadImage App.Path & "\sample.gif", True
         .Tab(1).Image.Image = .Tab(0).Image.Image
     End With
End Sub

Examples

VB6 View entire sample code

Private Sub LoadGDIPImgButton_Click()
    ' Load a GDI+ image
    CommonDialog1.Flags = cdlOFNExplorer Or cdlOFNFileMustExist
    CommonDialog1.FileName = ""
    CommonDialog1.ShowOpen
    If CommonDialog1.FileName <> "" Then
        On Error GoTo errorexit
        SftTabs1.Tab(SftTabs1.Tabs.Current).Image.LoadImage CommonDialog1.FileName, True
    End If
    Exit Sub

errorexit:
    MsgBox (Err.Description)
End Sub

Private Sub CheckboxButton_Click()

See Also SftPictureObject Object | Object Hierarchy


Last Updated 11/19/2026 - (email)
© 2026 Softel vdm, Inc.