![]() |
|
[C#] Listbox next Item - Printable Version +- Hack Forums (https://hackforums.net) +-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444) +--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151) +---- Forum: Software Development (https://hackforums.net/forumdisplay.php?fid=118) +---- Thread: [C#] Listbox next Item (/showthread.php?tid=5044760) |
Listbox next Item - Geekie - Nov 3, 2015 Hey guys, I have started coding this part yet for Obotle for my chessy pick up line bot for omegle. But what would be the best method to go to next item in a listbox. I don't want to use foreach or for I think thinking it starts off a first item once that item is sent it go to next item in the listbox. Anyone has a good method that would work. This isn't multi thread. a single thread. I was thinking something like this.. Code public void ChessyLine()* - He B TeMy - Nov 3, 2015 You can use Listbox.Items[index] for this. Or if you're talking about only selecting, you can do Listbox.SelectedItem +=1, don't forget to check for index overflow. * - +Haze - Nov 3, 2015 Code private string GetNextCheesyLine() I wrote that off head. Should work. * - Geekie - Nov 3, 2015 Thanks guys, Reason why I ask about my code because I have to send the message to the stranger. So the code would look like this. Code public void ChessyLine()Edit, The method I posted above works great thanks guys for the help. |