如题

解决方案 »

  1.   

    的确有这样的属性 MultiSelect = True
      

  2.   

    不用代码,设置MultiSelect:= True就行了
      

  3.   

    var
     i:Integer;
     s:string;
    begin
       for i:=0 to ListBox1.Items.Count-1 do
       if ListBox1.Selected[i] then
          s:=s+ListBox1.Items[i]+',';   showmessage(s);
    end;
      

  4.   

    我这样做了的还是不行啊
        if CheckBox2.Checked then begin
          listbox1.SelectAll;//这里是做了个全选么???
          for i := 0 to ListBox1.Count - 1 do begin
            if ListBox1.Selected[i] = True then
              ip := ListBox1.Items.Strings[i];
            ret := JBC7K2_Record(@ATrecord[0], block, pchar(ip), port);
          end;
        end
        else begin
          ret := JBC7K2_Record(@ATrecord[0], block, pchar(ip), port);
        end;
      

  5.   

    if CheckBox2.Checked then begin
      listbox1.SelectAll;//这里是做了个全选么???
      for i := 0 to ListBox1.Count - 1 do begin
      if ListBox1.Selected[i] = True then
      ip := ListBox1.Items.Strings[i];
      ret := JBC7K2_Record(@ATrecord[0], block, pchar(ip), port);
      end;
      end
      else begin
      ret := JBC7K2_Record(@ATrecord[0], block, pchar(ip), port);
      end;
    怎么做这个 IP才会循环赋值呢