brianmickey
08-19-2005, 06:21 AM
I have a class containing a function called Moveup.However whenever i press the "up" button of the keyboard, the picture that i have, disappear out of the screen. Can any 1 help
Public Sub MoveUp(ByVal pnl As Panel)
Top -= INCR
If Height + Top >= pnl.Height Then
Top = pnl.Height - Top
End If
End Sub
Private Sub frmGame_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles MyBase.KeyDown
If e.KeyCode = Keys.Up Then
bron.MoveUp(PnlGame)
End If
Public Sub MoveUp(ByVal pnl As Panel)
Top -= INCR
If Height + Top >= pnl.Height Then
Top = pnl.Height - Top
End If
End Sub
Private Sub frmGame_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles MyBase.KeyDown
If e.KeyCode = Keys.Up Then
bron.MoveUp(PnlGame)
End If