If Points(i).X < 0 Then Points(i).X = 0 Points(i).SpeedX = -Points(i).SpeedX End If If Points(i).Y < 0 Then Points(i).Y = 0 Points(i).SpeedY = -Points(i).SpeedY End If
If Points(i).X > Picture1.ScaleWidth - 1 Then Points(i).X = Picture1.ScaleWidth - 1 Points(i).SpeedX = -Points(i).SpeedX End If If Points(i).Y > Picture1.ScaleHeight - 1 Then Points(i).Y = Picture1.ScaleHeight - 1 Points(i).SpeedY = -Points(i).SpeedY End If Next i
If Points(i).X < 0 Then
Points(i).X = 0
Points(i).SpeedX = -Points(i).SpeedX
End If
If Points(i).Y < 0 Then
Points(i).Y = 0
Points(i).SpeedY = -Points(i).SpeedY
End If
If Points(i).X > Picture1.ScaleWidth - 1 Then
Points(i).X = Picture1.ScaleWidth - 1
Points(i).SpeedX = -Points(i).SpeedX
End If
If Points(i).Y > Picture1.ScaleHeight - 1 Then
Points(i).Y = Picture1.ScaleHeight - 1
Points(i).SpeedY = -Points(i).SpeedY
End If
Next i
If Points(i).X < 0 Then Points(i).X = 0 Points(i).SpeedX = -Points(i).SpeedX End If If Points(i).Y < 0 Then Points(i).Y = 0 Points(i).SpeedY = -Points(i).SpeedY End If
If Points(i).X > Picture1.ScaleWidth - 1 Then Points(i).X = Picture1.ScaleWidth - 1 Points(i).SpeedX = -Points(i).SpeedX End If If Points(i).Y > Picture1.ScaleHeight - 1 Then Points(i).Y = Picture1.ScaleHeight - 1 Points(i).SpeedY = -Points(i).SpeedY End If Next i