31-05-17, 06:01 PM
كود :
'PictureBox1 تحتاج أداة واحدة فقط
'ضع جميع الصور في الريسورس مع وضع اسمائهم في هذه المصفوفة
Private photos() As Image = {My.Resources.photo1, My.Resources.photo2, My.Resources.photo3, My.Resources.photo4}
Private Sub Form1_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
'تستطيع الاستغناء عن هذا السطر بوضع آخر صورة في المصفوفة في أداة الصورة
Me.PictureBox1.Image = photos(photos.Count - 1)
End Sub
'Interval مع تحديد الزمن في Enabled وفعل خاصيتة Timer اضف
Private Sub Timer1_Tick(sender As System.Object, e As System.EventArgs) Handles Timer1.Tick
Static index As Integer = 0
Me.PictureBox1.Image = photos(index)
index += 1
If index = photos.Count Then index = 0
End Sub