Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Vbkey open/close
#1
Hello, im using vbkey's to open players inventory and such.
But i what i got stuck at is how to make the second time the player presses the key, the pic will close.

Ex. You press "i" and the inventory opens.
Then you hit "i" again and the inventory closes
Pretty simple? Smile

This is the piece of code im using.
Code:
Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
    If (KeyCode = vbKeyI) Then
       picPlayerInventory.Visible = True
    End If
End Sub
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)