Private Sub Picture1_KeyDown(KeyCode As Integer, Shift As Integer)
If (KeyCode = vbKeyDown) Then
Picture1.Top = Picture1.Top + 30
End If
If (KeyCode = vbKeyUp) Then
Picture1.Top = Picture1.Top - 30
End If
If (KeyCode = vbKeyLeft) Then
Picture1.Left = Picture1.Left - 30
If Picture1.Left <= 0 Then
Picture1.Left = 18000
End If
End If
If (KeyCode = vbKeyRight) Then
Picture1.Left = Picture1.Left + 30
If Picture1.Left >= 18000 Then
Picture1.Left = 0
End If
End If
End Sub
No hay comentarios:
Publicar un comentario