SftButton/OCX 2.5

SftButton.LoadPicture Method

Softel vdm, Inc.

Loads a picture from a file/URL.

Syntax       

VB.NET

refPictureObj = object.LoadPicture(ByVal FileURL As String)  As System.Drawing.ImageLanguage-specific information

VB

refPictureObj = object.LoadPicture(ByVal FileURL As String)  As IPictureDisp

C#.NET

System.Drawing.ImageLanguage-specific information refPictureObj = object.LoadPicture(string FileURL);

VC++

IPictureDisp* refPictureObj = object->LoadPicture(_bstr_t FileURL);

C

HRESULT object->raw_LoadPicture(BSTR FileURL, IPictureDisp** refPictureObj);

Delphi

refPictureObj := object.LoadPicture(FileURL : WideString)  : TPictureLanguage-specific information;

object

A SftButton object.

FileURL

The filename or URL of a file containing a picture (bitmap, Windows metafile, icon, jpeg or gif format).  A URL must start with "http://" in which case the picture is loaded from the specified location. Otherwise, FileURL defines the location of a file on the local file system.

refPictureObj

Returns the graphic loaded from the specified file/URL FileURL. Nothing (NULL) is returned if the file/URL is inaccessible or if it is an invalid picture format.

Comments

The LoadPicture method loads a picture from a file/URL.

The specified filename FileURL can contain a bitmap, Windows metafile, icon, jpeg or gif image.

This method is mainly used with Internet Explorer to load pictures used as part of SftButton/OCX. Other environments usually offer picture, image or ImageList controls which can be used to hold pictures used by SftButton/OCX or the SftPictureObject.LoadImage method can be used.


Feedback / comments / error reports for this topic
© 2008 - Softel vdm, Inc. - www.softelvdm.com