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.
Nvm , it was easy to fix thx anyways.
Why don't just use an array to store the messages and proceed from there?
cause i wanna be creative and diffrent.. ;D
Quote from: ______ on April 10, 2003, 11:09 AM
cause i wnna be creative and diffrent.. ;D
ListViews are
much slower. You'll really be throwing performance out the window...
doesnt seem to be slow for me.
Quote from: ______ on April 10, 2003, 12:19 PM
doesnt seem to be slow for me.
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!
oh..... well least im happy with it for now. it does its job. and thats what i wanted instead of no anti flood.
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...
Quote from: MesiaH on April 10, 2003, 03:34 PMbut hey if your a beginner, a listbox would be a nice way to start...
When I first started with RB, I'd use an editfield (textfield/textbox?) to store data, instead of variables and properties.
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