The below code is in OnTimer event. If items from 2 list boxes are not matching - ShowMessage. I need to show the message only once, but because the timer is running, the message keeps popping up at the timer's set interval. I tried disabling the timer after ShowMessage line but then the message would even show.
for i := 0 to ListBox2.Items.Count - 1 do begin
p := ListBox1.Items.IndexOf(ListBox2.Items[i]);
if p = -1 then
ShowMessage('not matching');
end;
Thanks.