like that this is i dont want its 1 of the form of my program:D
and if someone could make that with the least code possible its perfect
Printable View
like that this is i dont want its 1 of the form of my program:D
and if someone could make that with the least code possible its perfect
1. Where are you from?
2. I dont exactly understand what you want but your code was messed up a bit, I fixed it up:
VB Code:
Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = vbKeyDown Then alien.Top = alien.Top + 500 ElseIf KeyCode = vbKeyUp Then alien.Top = alien.Top - 500 ElseIf KeyCode = vbKeyLeft Then alien.Left = alien.Left - 500 ElseIf KeyCode = vbKeyRight Then alien.Left = alien.Left + 500 End If If alien.Left < 0 Then alien.Left = alien.Left + 500 ElseIf alien.Left > 11300 Then alien.Left = alien.Left - 500 ElseIf alien.Top > 7800 Then alien.Top = alien.Top - 500 ElseIf alien.Top < 0 Then alien.Top = alien.Top + 500 End If End Sub