Click to See Complete Forum and Search --> : About Checkiing Borders


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

A1ien51
08-19-2005, 08:22 AM
The panel height should have nothing to do when you are pushing the up button since you are moving towards "Zero". Moving down would se the height.

Eric