View Single Post
 
Old 07-31-2017, 01:56 PM
kaitoby kaitoby is offline
Newcomer
 
Join Date: Jul 2017
Posts: 2
Unhappy Colision Between 2 Images on VB6.0

Hello, My name its cristobal
im currently doing a project. Its a "Ship" simulator in 2D
im using Visual basic 6.0 my current version to execute my program and until now everything its going well enought
but i had a problem.
i can made my "boat" move througt the module.
but it goes off the limits and doesnt colide with the other imageboxes.
i do literally all the codes
even with Bound the program simply doesnt recognize the codes i use...
Anyone can help me? i give the picture of the program and the code i use


e9d542cda73cf0048a6d0a3590ecdd70.jpg


Code:
Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 38 Then
    Bote.Top = Bote.Top - 10
    Bote.Picture = BoteARR.Picture
End If
If KeyCode = 40 Then
    Bote.Top = Bote.Top + 10
    Bote.Picture = BoteABJ.Picture
End If
If KeyCode = 37 Then
    Bote.Left = Bote.Left - 10
    Bote.Picture = BoteIZQ.Picture
End If
If KeyCode = 39 Then
    Bote.Left = Bote.Left + 10
    Bote.Picture = BoteDER.Picture
End If
End Sub
Reply With Quote