Hello all, I have a thread pool that calls a function and in the function it checks if invoke is required and if it is, it invokes the function and returns the value. Somehow this is creating an infinite loops and was wondering if you could help me find the problem. Heres my code:
tbWordlist is a Trackbar that keeps track of my position in the Listbox.Code:private delegate string GetComboDelegate(); private string GetCombo() { if (lbWordlist.InvokeRequired) { return lbWordlist.Invoke(new GetComboDelegate(GetCombo)).ToString(); } else { while ((lbWordlist.Items[tbWordlist.Value - 1].ToString()).IndexOf(':') == -1) { tbWordlist.Value += 1; } string tmp = lbWordlist.Items[tbWordlist.Value - 1].ToString(); if (tbWordlist.Value == tbWordlist.Maximum) StopBots = true; else tbWordlist.Value += 1; return tmp; } }




Reply With Quote