Events 在F5上触发VB6错误事件
我在用户控件上有一个网格,该控件位于ActiveX exe应用程序中的用户文档vbd页面上 这是我在网格上按F5时得到的事件Events 在F5上触发VB6错误事件,events,vb6,activex-exe,Events,Vb6,Activex Exe,我在用户控件上有一个网格,该控件位于ActiveX exe应用程序中的用户文档vbd页面上 这是我在网格上按F5时得到的事件 Private Sub mnuRightClickRefresh_Click() 'Call ... End Sub 当我在网格上按F3时 我得到了正确的事件 Private Sub grdObjects_KeyUp(KeyCode As Integer, Shift As Integer) If KeyCode = 116
Private Sub mnuRightClickRefresh_Click()
'Call ...
End Sub
当我在网格上按F3时
我得到了正确的事件
Private Sub grdObjects_KeyUp(KeyCode As Integer, Shift As Integer)
If KeyCode = 116 Then
'...
End If
End Sub
有什么想法吗?似乎您正试图在两个不同的函数中处理_KeyUp函数。 按F5键时,请确保没有控件具有任何焦点(从而使窗体本身成为焦点控件),然后可以按以下方式处理事件:
Private Sub grdObjects_KeyUp(KeyCode As Integer, Shift As Integer)
Select Case KeyCode
Case 116
'Do Whatever F3 would want to do
Case 118
'Do F5 Stuff
Case 119
'Any other stuff for F6
End Select
End Sub
如果这是您想要的,请告诉我。老实说,不,我不知道。标准的现成VB6键盘快捷键是
F5-Run>Start
和F3-Edit>Find Next