Private Sub Middlewallmove_Tick(sender As Object, e As EventArgs) Handles MiddleWall.Tick
' Move the middle wall ball.
Label4.Location = New Point(Label4.Location.X, Label4.Location.Y + yVel)
' Check for top wall.
If Label4.Location.Y < 0 Then
Label4.Location = New Point(Label4.Location.X, 0)
yVel = -yVel
End If
' Check for bottom wall.
If Label4.Location.Y > Me.Height - Label4.Size.Height - 45 Then
Label4.Location = New Point(Label4.Location.X, Me.Height - Label4.Size.Height - 45)
yVel = -yVel
End If
End Sub
Private Sub Cheeselabel_Tick(sender As Object, e As EventArgs) Handles BottomWallMove.Tick
Label5.Location = New Point(Label5.Location.X + xVel, Label5.Location.Y)
' Check for left wall.
If Label5.Location.X < 619 Then
Label5.Location = New Point(619, Label5.Location.Y)
xVel = -xVel
End If
' Check for bottom wall.
If Label5.Location.X > 724 Then
Label5.Location = New Point(724, Label5.Location.Y)
xVel = -xVel
End If
End Sub