Hide

SftTabs/OCX 6.5 - Tab Control for VB6

Display
Print

SftPictureObject.Image Property

Defines the image object using a GDI+ image.

Syntax

Get
VBGDIPlusImage = object.Image As LONG_PTR
Put
VBobject.Image = GDIPlusImage As LONG_PTR

object

A SftPictureObject object.

GDIPlusImage

Defines the image object using a GDI+ image.

Comments

The Image property defines the image object using a GDI+ image. The image remains owned by the application and must remain valid as long as it is used by the control. Once it is no longer needed, it must be deleted by the application. Most languages, except C++, automatically delete the object when it is no longer needed so no action is usually necessary.

The Image property offers support for PNG, TIFF, JPEG, GIF, Exif, EMF+, EMF (GDI+ images) with full support for alpha-blended (translucent and semi-transparent) images.

SetImage can also be used to define the image object using a GDI image, but is also assign ownership of the GDI+ image to the control, so it automatically deletes the object when it is no longer needed. This is typically only used by C++ applications that have direct access to GDI+ classes.

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

See Also SftPictureObject Object | Object Hierarchy


Last Updated 08/13/2020 - (email)
© 2024 Softel vdm, Inc.