15-01-17, 10:02 PM
تفضل الكود
كود :
Private Sub BackgroundWorker1_DoWork(sender As System.Object, e As System.ComponentModel.DoWorkEventArgs) Handles BackgroundWorker1.DoWork
Jids = txtids.Text.Split("#")
Dim i, j As Integer
For i = 0 To Jids.Length - 1
For j = 0 To ListBox1.Items.Count - 1
emad1(i).Send("<presence to='" & ListBox1.Items(j) & "@nimbuzz.com' type='subscribe'/>")
Threading.Thread.Sleep(1000)
Dim a As Integer = (i + j)
Dim b As Integer = (ListBox1.Items.Count + Jids.Length)
Me.ProgressBar1.Invoke(Sub()
Me.ProgressBar1.Value = ((a + 1) / (b)) * 100
End Sub)
Next
Next
End Sub

