25-10-12, 12:07 AM
السلام عليكم ورحمة الله وبركاته
****
***
**
*
كود :
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Timer1.Enabled = False ' تعطيل العداد عند تشغيل الفورم
Timer1.Interval = 5000 ' تأخير التايمر خمسة ثواني
Me.Text = "Stop"
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Timer1.Enabled = True 'تشغيل التايمر
Me.Text = "Running"
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Timer1.Enabled = False ' تعطيل التايمر
Me.Text = "Stop"
End Sub
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
Me.ListBox1.Items.Add("VB4ARAB") ' ملء الأداة كل خمسة ثواني
End Sub****
***
**
*

