vb keydown问题、
只有一个图形me代码如下:PrivateSubform_KeyDown(KeyCodeAsInteger,ShiftAsInteger)IfKeyCode=37ThenM...
只有一个图形me
代码如下:
Private Sub form_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 37 Then
Me.Left = Me.Left - 120
End If
If KeyCode = 39 Then
Me.Left = Me.Left + 120
End If
If KeyCode = 38 Then
Me.Top = Me.Top - 120
End If
If KeyCode = 40 Then
Me.Top = Me.Top + 120
End If
End Sub
窗口名字不是me
但我点击方向键的时候,me没动而窗口却动了,怎么办? 展开
代码如下:
Private Sub form_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 37 Then
Me.Left = Me.Left - 120
End If
If KeyCode = 39 Then
Me.Left = Me.Left + 120
End If
If KeyCode = 38 Then
Me.Top = Me.Top - 120
End If
If KeyCode = 40 Then
Me.Top = Me.Top + 120
End If
End Sub
窗口名字不是me
但我点击方向键的时候,me没动而窗口却动了,怎么办? 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询