if ListBox1.Items.Values[Login] = '' then begin ListBox1.Items.Values[Login] := edit1; LastMess := mMess.Lines.Count; end;