vb的keydown问题
PrivateSubForm_KeyDown(KeyCodeAsInteger,ShiftAsInteger)IfKeyCode=vbyKeyUpThenIfbird.T...
Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = vbyKeyUp Then
If bird.Top = 0 Then
Else
bird.Top = bird.Top - 10
End If
End If
End Sub
不好使,请高人检查一下 展开
If KeyCode = vbyKeyUp Then
If bird.Top = 0 Then
Else
bird.Top = bird.Top - 10
End If
End If
End Sub
不好使,请高人检查一下 展开
展开全部
Private Sub Form_Load()
Me.KeyPreview = True
End Sub
Me.KeyPreview = True
End Sub
更多追问追答
追问
没用
追答
Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = vbKeyPageUp Then
If bird.Top = 0 Then
Else
bird.Top = bird.Top - 10
End If
End If
Print KeyCode '你最好看看按键的值,可以直接用值来代替常量vbKeyPageUp
End Sub
Private Sub Form_Load()
Me.KeyPreview = True
End Sub
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询