如和用for循环读取ListBox1里的每条内容!!

解决方案 »

  1.   

    var
        i: integer;
    begin
        for i := 0 to ListBox1.Items.Count - 1 do
        begin
            ShowMessage(ListBox1.Items.Strings[i]);
        end;
    end;
      

  2.   

    var
        i: integer;
    begin
        for i := 0 to ListBox1.Items.Count - 1 do
        begin
            ShowMessage(ListBox1.Items.Strings[i]);
        end;
    end;
    引用妖哥的。
      

  3.   

     for i := 0 to ListBox1.Items.Count - 1 do
      

  4.   

    for i := 0 to ListBox1.Items.Count - 1 do 
    从0到count-1是因为listbox是从零开始计的。