Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Public Class Form1
- Dim picLoc() As PictureBox
- Dim anyImage1() As PictureBox
- Dim anyImage2() As PictureBox
- Dim anyImage3() As PictureBox
- Private Sub Form1_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
- PictureBox1.Hide()
- PictureBox2.Hide()
- PictureBox3.Hide()
- anyImage1 = {Me.PictureBox2, Me.PictureBox3}
- anyImage2 = {Me.PictureBox1, Me.PictureBox3}
- anyImage3 = {Me.PictureBox2, Me.PictureBox1}
- End Sub
- Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click
- PictureBox1.Show()
- picLoc = {Me.PictureBox1}
- For Each p As PictureBox In anyImage1
- If PictureBox3.Visible = True Or PictureBox2.Visible = True Then
- PictureBox1.Location = New Point(12, 427)
- p.Left += 90
- End If
- Next
- End Sub
- Private Sub Button2_Click(sender As System.Object, e As System.EventArgs) Handles Button2.Click
- PictureBox2.Show()
- picLoc = {Me.PictureBox2}
- For Each p As PictureBox In anyImage2
- If PictureBox1.Visible = True Or PictureBox3.Visible = True Then
- PictureBox2.Location = New Point(12, 427)
- p.Left += 90
- End If
- Next
- End Sub
- Private Sub Button3_Click(sender As System.Object, e As System.EventArgs) Handles Button3.Click
- PictureBox3.Show()
- picLoc = {Me.PictureBox3}
- For Each p As PictureBox In anyImage3
- If PictureBox1.Visible = True Or PictureBox2.Visible = True Then
- PictureBox3.Location = New Point(12, 427)
- p.Left += 90
- End If
- Next
- End Sub
- Private Sub Button4_Click(sender As System.Object, e As System.EventArgs) Handles Button4.Click
- If PictureBox1.Visible = True Then
- PictureBox1.Hide()
- For Each p In anyImage1
- If p.Location.X > 102 Then
- p.Left -= 90
- ElseIf PictureBox1.Location = New Point(12, 427) Then
- p.Left -= 90
- End If
- Next
- End If
- End Sub
- Private Sub Button5_Click(sender As System.Object, e As System.EventArgs) Handles Button5.Click
- If PictureBox2.Visible = True Then
- PictureBox2.Hide()
- For Each p In anyImage2
- If p.Location.X > 102 Then
- p.Left -= 90
- ElseIf PictureBox2.Location = New Point(12, 427) Then
- p.Left -= 90
- End If
- Next
- End If
- End Sub
- Private Sub Button6_Click(sender As System.Object, e As System.EventArgs) Handles Button6.Click
- If PictureBox3.Visible = True Then
- PictureBox3.Hide()
- For Each p In anyImage3
- If p.Location.X > 102 Then
- p.Left -= 90
- ElseIf PictureBox3.Location = New Point(12, 427) Then
- p.Left -= 90
- End If
- Next
- End If
- End Sub
- End Class
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement