need help with listbox
If you need help with a project or need to know how to do something specific in VB.NET then please ask your questions in here.
Forum rules
Please LOCK your topics once you have found the solution to your question so we know you no longer require help with your query.
Please LOCK your topics once you have found the solution to your question so we know you no longer require help with your query.
6 posts
Page 1 of 1
hello,
who can help us with this weird small problem
it seems after been removed from listbox
and listbox will be empty it keeps going with checking
the point is when the listbox is empty it need to stop
because when everything has been deleted why do he keep checking it?
what did we forgot?
who can help us with this weird small problem
it seems after been removed from listbox
and listbox will be empty it keeps going with checking
the point is when the listbox is empty it need to stop
because when everything has been deleted why do he keep checking it?
what did we forgot?
Code: Select all
thank you. Dim file(ListBox2.Items.Count - 1) As String
For i = 0 To ListBox2.Items.Count - 1
file(i) = ListBox2.Items(i).ToString()
Next
For x = 0 To file.Length - 1
checkme()
Me.Cursor = Cursors.Default
If sended Then
ListBox2.Items.RemoveAt(0)
Application.DoEvents()
End If
Next
visit us on:
http://www.softpedia.com/get/System/Lau ... -Run.shtml
Check it out ! http://www.softpedia.com/publisher/I-A- ... 90017.html
Check it out ! http://www.softpedia.com/get/Desktop-En ... lock.shtml
http://www.softpedia.com/get/System/Lau ... -Run.shtml
Check it out ! http://www.softpedia.com/publisher/I-A- ... 90017.html
Check it out ! http://www.softpedia.com/get/Desktop-En ... lock.shtml
What is 'checkme()' for function?
Practice makes perfect!
VIP since: 6-10-2011
VIP since: 6-10-2011
#clanc789
don't worry about the checkme() part
its the for x that has troubles
don't worry about the checkme() part
its the for x that has troubles

visit us on:
http://www.softpedia.com/get/System/Lau ... -Run.shtml
Check it out ! http://www.softpedia.com/publisher/I-A- ... 90017.html
Check it out ! http://www.softpedia.com/get/Desktop-En ... lock.shtml
http://www.softpedia.com/get/System/Lau ... -Run.shtml
Check it out ! http://www.softpedia.com/publisher/I-A- ... 90017.html
Check it out ! http://www.softpedia.com/get/Desktop-En ... lock.shtml
well i forgot a lot about vb programming but it seems to me that this is the problem
Code: Select all
Why don't you put that in a IF statement that checks if there are items in the listbox, if so runs the loop. For x = 0 To file.Length - 1
checkme()
Me.Cursor = Cursors.Default
If sended Then
ListBox2.Items.RemoveAt(0)
Application.DoEvents()
End If
Next
You can find me on Facebook or on Skype mihai_92b
#XTechVB
i have that part already but doesn't do anything about it
it still continues.
i have that part already but doesn't do anything about it
it still continues.
visit us on:
http://www.softpedia.com/get/System/Lau ... -Run.shtml
Check it out ! http://www.softpedia.com/publisher/I-A- ... 90017.html
Check it out ! http://www.softpedia.com/get/Desktop-En ... lock.shtml
http://www.softpedia.com/get/System/Lau ... -Run.shtml
Check it out ! http://www.softpedia.com/publisher/I-A- ... 90017.html
Check it out ! http://www.softpedia.com/get/Desktop-En ... lock.shtml
You remove the items from the ListBox, but you don't remove them from the array.
Could that be why it still checks even though the ListBox is empty?
Could that be why it still checks even though the ListBox is empty?
6 posts
Page 1 of 1
Copyright Information
Copyright © Codenstuff.com 2020 - 2023