Public Class Form1
Private mImages1 As ArrayList = New ArrayList()
Private mCount1 As Integer = 0
Private mImages2 As ArrayList = New ArrayList()
Private mCount2 As Integer = 0
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim i As IntegerFor i = 0 To 4mImages1.Add(Image.FromFile(
"C:\Users\AMAkal\Pictures\pic" & i & ".jpg"))PictureBox1.BackgroundImage =
CType(mImages1(0), Image)
NextDim x As IntegerFor x = 0 To 4mImages2.Add(Image.FromFile(
"C:\Users\AMAkal\Downloads\bb" & x & ".jpg"))PictureBox2.BackgroundImage =
CType(mImages1(0), Image)
NextEnd SubPrivate Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.TickTimer1.Interval = 1000
mCount1 = (mCount1 + 1)
Mod 5PictureBox1.BackgroundImage =
CType(mImages1(mCount1), Image)PictureBox1.BackgroundImageLayout = ImageLayout.Stretch
End SubPrivate Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.ClickTimer1.Start()
End Sub
Private Sub Timer2_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer2.TickTimer2.Interval = 1000
mCount2 = (mCount2 + 1)
Mod 5PictureBox2.BackgroundImage =
CType(mImages2(mCount2), Image)PictureBox2.BackgroundImageLayout = ImageLayout.Stretch
End SubPrivate Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.ClickTimer2.Start()
End SubPrivate Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
Me.Close()
End SubPrivate Sub Show1ToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Show1ToolStripMenuItem.ClickTimer1.Start()
End SubPrivate Sub Show2ToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Show2ToolStripMenuItem.ClickTimer2.Start()
End SubPrivate Sub EXITToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles EXITToolStripMenuItem.Click
Me.Close()
End SubEnd
Class
No comments:
Post a Comment