Partilhar via


Image.loadResource(Int32) Method

Definition

Loads a resource from Ax32.exe.

public:
 virtual int loadResource(int _id);
public virtual int loadResource (int _id);
abstract member loadResource : int -> int
override this.loadResource : int -> int
Public Overridable Function loadResource (_id As Integer) As Integer

Parameters

_id
Int32

The ID of the resource that you want to load. Values of resources can be found in the Resources macro.

Returns

0 indicates success; otherwise, failure.

Remarks

The following example adds two resources to an image list.

#Resource 
Image img; 
ImageList imageList; 
imageList = new Imagelist( 
    Imagelist::smallIconWidth(), 
    Imagelist::smallIconHeight()); 
img = new Image(); 
img.loadResource(#RES_NODE_CLOSED); 
imageList.add(img); 
img = new Image(); 
img.loadResource(#RES_NODE_OPEN); 
imageList.add(img);

Applies to