{
Continue, Items, Selected example
This example uses a file listbox and a regular listbox on a form. The following routine scans through the files listed in the file listbox and lists the sizes of any selected files to the regular list box:
} 
var
  F: File;
  i: Integer;
begin
  for i := 0 to (FileListBox1.Items.Count - 1) do begin
  try
    if FileListBox1.Selected[i] then 
    begin
      if not FileExists(FileListBox1.Items.Strings[i]) then begin
        MessageDlg('File: ' + FileListBox1.Items.Strings[i] + 
                   ' not found', mtError, [mbOk], 0);
        Continue;
      end;
      AssignFile(F, FileListBox1.Items.Strings[i]);
      Reset(F, 1);
      ListBox1.Items.Add(IntToStr(FileSize(F)));
      CloseFile(F);
    end;
   finally
   { do something here }
   end;
  end;
end; 
