processlist SystemIconIndex property
Return to Introduction  Previous page  Next page
Applies to
acProcess object.  

Declaration
property SystemIconIndex: Integer; // read-only!  

Description
The SystemIconIndex determines the index of the application icon within the system image list.  
 
tip To retrieve the full list of system images you can use acSystemImageList component.  

Example
// Demonstrates how to fill the ListView with process entries and display the icon of the process.  
// Let's consider that ViewStyle = vsReport  
// and SmallImages assigned to some acSystemImageList component dropped onto the same form.  
procedure TForm1.Button1Click(Sender: TObject);  
var  
  I: Integer;  
  ListItem: TListItem;  
begin  
  ListView1.Items.BeginUpdate;  
  try  
    ListView1.Items.Clear;  
    I := acProcessList1.Count;  
    if I <> 0 then  
     for I := 0 to I - 1 do  
      begin  
       ListItem := ListView1.Items.Add;  
       ListItem.Caption := acProcessList1[I].ExeName;  
       ListItem.ImageIndex := acProcessList1[I].SystemIconIndex;  
 
       // associate the Data pointer to TacProcess object and Data pointer of Process object to ListItem  
       ListItem.Data := acProcessList1[I];  
       acProcessList1[I].Data := ListItem;  
      end;  
  finally  
    ListView1.Items.EndUpdate;  
  end;  
end;  

See also
Description, SystemIconIndex, SystemIcon16Handle and SystemIcon32Handle properties;  
acSystemImageList component.