The pic don't leave the form in the top, or left side, but i cant get it to not leave the form in the bottom, or right side..
What's wrong?
Code:If blnKeys(vbKeyUp) Then If picFly.Top > 0 Then picFly.Top = picFly.Top - 1 End If End If If blnKeys(vbKeyDown) Then If picFly.Top < Me.Height Then picFly.Top = picFly.Top + 1 End If End If If blnKeys(vbKeyLeft) Then If picFly.Left > Me.Left Then picFly.Left = picFly.Left - 1 End If End If If blnKeys(vbKeyRight) Then If (picFly.Left + picFly.Width) > Me.Width - 100 Then picFly.Left = Me.Width - picFly.Width - 100 End If End If




Reply With Quote