ShowMessage(ListBox7.Items[0]); //or //ShowMessage(ListBox7.Items.Strings[0]);
You should also check at "begin" what you doing.(I allways check that all the end; statements are wehre they should be...)
procedure TForm1.Button96Click(Sender: TObject); var i: Integer; begin for i := ListBox1.Count -1 downto 0 do begin; /// <<<<<<<<<< look how your line ends and when you use "i", why not use it at all? ListBox1.ItemIndex := ListBox1.Items.Count-1; ListBox6.Items.Add((ListBox1.Items.Strings[Pred(ListBox1.Count -1)])); ListBox1.Items.Delete(ListBox1.ItemIndex); end; ListBox6.ItemIndex := ListBox6.Items.Count-1; ListBox1.ItemIndex := ListBox1.Items.Count-1; ListBox1.Clear; end;