Click here to Skip to main content
15,886,919 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Dear to All,I am making a program in visual basic 2008 for sending SMS.I have some Difficulties with ListBox and Labels with Timer.Please help me for solving my questions.
My questions are :

1 - I have a ListBox with Mobile Numbers as items of Listbox.
2- I have 3 Labels.
   (First label is for showing listbox item)
   (2nd Label is for showing counting 1 to 10)
   (3rd Label is for showing Result such as Sending,Ok)

My question is that when user click the Send Message button.Then label1 show First item , label 2 start counting 1 to 10,after completing counting 3rd label show result such as Sending Is ok.

After this first label again show listbox item no 2 and counting againg start and so on.When completed all the Items in listbox , A message show us that Operation has Completed.

Please help me in this matter.

I have use following code but this code only show counting and result .
VB
For i = 0 To ListBox1.Items.Count - 1
    ListBox1.SelectedItem = ListBox1.SelectedItem + 1
    Label1.Text = ListBox1.SelectedItem
    Timer1.Start()
    Timer1.Interval = 1000
    Label2.Text += 1
    If Label2.Text = 10 Then
        Label3.Text = "Message has sent"
        Timer1.Stop()
        ListBox1.SelectedItem = ListBox1.SelectedItem + 1
    End If
Next i

please help me.Thanks
Posted
Updated 28-May-13 0:27am
v2
Comments
Basmeh Awad 28-May-13 6:38am    
so where did you stuck???what not showing Timer on label2???
Atmir 28-May-13 9:27am    
what do you need exatly and where you stuck
Sergey Alexandrovich Kryukov 29-May-13 0:53am    
This post is not any certain question, because you did not tag the UI library or application type you are using. For example, if you are talking about ListBox, you should specify its exact fully-qualified type name. There are several different types under this simple name. Also, there are several different timer types. Which one do you use?
—SA

1 solution

Have a look at similar question and answers: Take One List Box Item At A Time Then Perform Code[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900