
Zitat von
BUG:
not ist nicht nur ein Operator für Booleanwerte, sondern auch für Integer.
Dort bildet
not die bitweise Negation.
Um das zu vermeiden, benutze entweder eine Klammer mehr:
if (i = ListBox2.Items.Count -1) or ((not (StrToInt(ComboBox2.Text) = 0)) and (StrToInt(ComboBox2.Text) = h)) then
oder vergleiche anders und lass
not weg:
if (i = ListBox2.Items.Count -1) or ((StrToInt(ComboBox2.Text) <> 0) and (StrToInt(ComboBox2.Text) = h)) then
Ich hoffe, ich habe richtig verstanden, was du willst

Dankeschön BUG, funktioniert einwandfrei =)