Quantcast
Viewing all articles
Browse latest Browse all 15587

VS 2012 ListBox items will add infinitely

Hey, You might miss my previous tread.
It is not duplicated.

Here's the thing:
There's a list box which several items need to be added in it when their own conditions would be true, in a 1 second timer.

Code:

Private sub Timer1_Tick()
If AlarmCondition = True Then

If ListBox1.FindStringExact ("ALARM") Then
ListBox1.Items.Add ("ALARM")
'Do alarm condition thing
End If

end If
End sub

Aforementioned code will properly do when list box items are clear.
But when items quantity to check increases (and few of them are in ALARM condition,) Similar alarms will add to the listbox infinitely. Like it trapped in a loop. (If true condition -> Timer 1s -> Add item -> Repeat).

Is there any other property/method/way like .FindStringExact which I am not aware of? :ehh: Frankly it acts like a super bug. plz help

Viewing all articles
Browse latest Browse all 15587

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>