Hide

SftMask/OCX 7.0 - ActiveX Masked Edit Control

Display
Print

SetImage Method, SftPictureObject Object

Defines the picture object attributes defined as a GDI+ image.

Syntax

VB.NETobject.SetImage(ByVal GDIPlusImage As Integer, ByVal Owned As Boolean)
VBobject.SetImage(ByVal GDIPlusImage As LONG_PTR, ByVal Owned As Boolean)
C#.NETvoid object.SetImage(int GDIPlusImage, bool Owned);
VC++HRESULT object->SetImage(LONG_PTR GDIPlusImage, VARIANT_BOOL Owned);
CHRESULT object->raw_SetImage(LONG_PTR GDIPlusImage, VARIANT_BOOL Owned);

object

A SftPictureObject object.

GDIPlusImage

A pointer to a Gdiplus::Image object.

Owned

Set to True if the GDI+ image is owned by the masked edit control, False otherwise.

Comments

The SetImage method defines the picture object attributes defined as a GDI+ image.

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

If Owned is set to False, 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.

If Owned is set to True, the control automatically deletes the image object when it is no longer needed.

The SftPictureObject.Type property is set to sftTypeGDIPlus. The SftPictureObject.Height and SftPictureObject.Width properties reflect the image size.

The Image property can also be used to define the image object using a GDI+ image, but it does not assign ownership of the GDI+ image to the control. SetImage(image, False) is identical to the use of the Image property.

See Also SftPictureObject Object | Object Hierarchy


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