Author | Message | Time |
---|---|---|
______ | so far it works but the thing is it sends all the listview items if there is more than 1. I just want to send 1 at a time. Private Sub Que_Timer() Dim quetick As Integer Dim queinterval As Integer quetick = quetick + 1 If quetick >= queinterval Then For i = 1 To LvQueMsg.ListItems.Count If LvQueMsg.ListItems.Count = 0 Then Exit Sub End If sckbnet.Send LvQueMsg.ListItems(i).Text Addtext vbWhite, LvQueMsg.ListItems(i).Text LvQueMsg.ListItems.Remove LvQueMsg.ListItems(i).Index quetick = 0 i = i - 1 Next i End If could anyone help me make it so it sends one at a time instead all the messages at once. | April 9, 2003, 9:17 PM |
______ | Nvm , it was easy to fix thx anyways. | April 10, 2003, 12:10 AM |
Smurfling | Why don't just use an array to store the messages and proceed from there? | April 10, 2003, 2:15 PM |
______ | cause i wanna be creative and diffrent.. ;D | April 10, 2003, 4:09 PM |
Skywing | [quote author=______ link=board=17;threadid=999;start=0#msg7468 date=1049990978] cause i wnna be creative and diffrent.. ;D [/quote]ListViews are much slower. You'll really be throwing performance out the window... | April 10, 2003, 4:50 PM |
______ | doesnt seem to be slow for me. | April 10, 2003, 5:19 PM |
Yoni | [quote author=______ link=board=17;threadid=999;start=0#msg7471 date=1049995182] doesnt seem to be slow for me. [/quote] Your listview has a relatively very low number of items, so you aren't noticing the difference. Try to benchmark listview vs. array with many items (10000+). In general, you shouldn't be using a listview for internal storage. That's what arrays and collections are for! | April 10, 2003, 5:25 PM |
______ | oh..... well least im happy with it for now. it does its job. and thats what i wanted instead of no anti flood. | April 10, 2003, 5:42 PM |
MesiaH | Speed shouldnt matter as far as performance goes, unless you have massive amounts of items in the queue, which should never happen, because your obviously trying to slow down the rate at which messages are sent, but arrays or stacks are they way to go, safer, smarter, more functionable, and just plain smarter, but hey if your a beginner, a listbox would be a nice way to start... | April 10, 2003, 8:34 PM |
tA-Kane | [quote author=MesiaH link=board=17;threadid=999;start=0#msg7483 date=1050006895]but hey if your a beginner, a listbox would be a nice way to start...[/quote] When I first started with RB, I'd use an editfield (textfield/textbox?) to store data, instead of variables and properties. | April 11, 2003, 12:52 PM |
MesiaH | heh now its not too bad of an idea to do something like that, like before i knew what booleans where, i used checkbox's, they do the same thing all in all, but slow down your program, and make it a bit larger than nescisary | April 11, 2003, 6:56 PM |