28-06-14, 12:50 AM
.....
لم أفهم سبب استخدام التايمر Timer
.....
كود :
Public Class Form1
Private Sub Button1_Click(ByVal sender As Object, ByVal e As EventArgs) Handles Button1.Click
For r = 0 To ListBox1.Items.Count - 1
ListBox1.SetSelected(r, True)
Label1.Text = "join"
fun()
' هذين السطرين فقط لترى العملية بشكل بطئ
Application.DoEvents()
Threading.Thread.Sleep(500)
Next
End Sub
Private Sub fun()
If Label1.Text.Contains("join") Then
ListBox2.Items.Add(ListBox1.SelectedItem & Label1.Text)
End If
End Sub
End Classلم أفهم سبب استخدام التايمر Timer
.....



