Image.loadResource Method

Loads a resource from Ax32.exe.

Syntax

public int loadResource(int id)

Run On

Client

Parameters

  • id
    Type: int
    The ID of the resource that you want to load. Values of resources can be found in the Resources macro.

Return Value

Type: int
0 indicates success; otherwise, failure.

Examples

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);

See Also

Image Class

Image::resourceType Method