I am making a game were I need to check that every time that my enemies collide, the bounce to the other side, I tried creating two for .. next and checking with intersects with, but it failed.
Public Class Form1
Private pic_Nave As Nave
Private pic_Base As Base
Private vDesecho(10) As Desecho
Private nivel As Integer
Private vAsteroide(10) As Asteroide
Private desechoEliminated As Integer
'Private cont(10) As Double
Private spawntime As Integer
Private Sub tmr_Mover_Tick(sender As Object, e As EventArgs) Handles tmr_Mover.Tick
    pic_Nave.Mover(Me)
    pic_Base.Mover(Me)
    spawntime -= 1
    lblitems.Text = spawntime
    For i = 0 To 9
        vDesecho(i).Mover(Me)
        If (pic_Nave.imagen.Bounds.IntersectsWith(vDesecho(i).imagen.Bounds)) Then
            Controls.Remove(vDesecho(i).imagen)
        End If
        If (pic_Base.imagen.Bounds.IntersectsWith(vDesecho(i).imagen.Bounds)) Then
            vDesecho(i).diry = -vDesecho(i).diry
        End If
    Next
    'For i = 0 To 9
    'For j = 9 To 0
    'If (vDesecho(i).imagen.Bounds.IntersectsWith(vDesecho(j).imagen.Bounds)) Then
    'spawntime = 5
    'vDesecho(i).dirx = -vDesecho(i).dirx
    'vDesecho(j).diry = -vDesecho(j).diry
    'vDesecho(j).Mover(Me)
    'End If
    'Next
    'Next
    For i = 0 To nivel - 1
        vAsteroide(i).Mover(Me)
        If (pic_Base.imagen.Bounds.IntersectsWith(vAsteroide(i).imagen.Bounds)) Then
            vAsteroide(i).diry = -vAsteroide(i).diry
        End If
    Next
End Sub
Private Sub makedesecho()
    For i = 1 To 1
        vDesecho(i) = New Desecho()
        Controls.Add(vDesecho(i).imagen)
        vDesecho(i).Mover(Me)
        If (pic_Nave.imagen.Bounds.IntersectsWith(vDesecho(i).imagen.Bounds)) Then
            Controls.Remove(vDesecho(i).imagen)
            desechoEliminated = desechoEliminated + 1
        End If
    Next
End Sub
Public Sub New()
    ' Esta llamada es exigida por el diseñador.
    InitializeComponent()
    ' Agregue cualquier inicialización después de la llamada a InitializeComponent().
    nivel = 1
    desechoEliminated = 0
    spawntime = 5
    For i = 0 To 9
        vDesecho(i) = New Desecho()
        Controls.Add(vDesecho(i).imagen)
    Next
    For i = 0 To nivel - 1
        vAsteroide(i) = New Asteroide()
        Controls.Add(vAsteroide(i).imagen)
    Next
    pic_Nave = New Nave()
    Controls.Add(pic_Nave.imagen)
    pic_Base = New Base()
    Controls.Add(pic_Base.imagen)
    tmr_Mover.Start()
End Sub
Protected Overrides Function ProcessCmdKey(ByRef msg As Message, keyData As Keys) As Boolean
    Select Case keyData
        Case Keys.Up
            pic_Nave.diry -= 1
        Case Keys.Down
            pic_Nave.diry += 1
        Case Keys.Left
            pic_Nave.dirx -= 1
        Case Keys.Right
            pic_Nave.dirx += 1
    End Select
    Return MyBase.ProcessCmdKey(msg, keyData)
End Function
End Class
This is the full class, I’m using also a timer to move some other objects like an spaceship and the enemies are space junk. i need a way to know when the space junks collide between them, to make them bounce
 
     
    