Share via


Imagelist.remove(Int32) Method

Definition

Removes an image from an image list.

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

Parameters

_imageIdx
Int32

The position of the image to remove from the list.

Returns

0 if the method is successful.

Remarks

The following example creates an image list, adds the icons in shell32.dll file, and then deletes the fourth member of the list.

Imagelist list = new Imagelist( 
    Imagelist::iconWidth(), 
    Imagelist::iconHeight() ); 
list.loadIcons('shell32.dll'); 
print list.count(); 
list.remove(4); 
print list.count(); 
pause;

Applies to