if ListBox1.Items.IndexOf(Edit1.Text)<>-1 then showmessage('已存在')else ListBox1.Items.Add(Edit1.Text);