请教代码的意思,以及怎么才能触发该事件
--------------------编程问答-------------------- Option Explicit
Option Explicit
Dim mItSkill As String
Private Sub cmdCalMonth_KeyDown(KeyCode As Integer, Shift As Integer)
Dim ShiftDown, AltDown, CtrlDown
ShiftDown = (Shift And vbShiftMask) > 0
AltDown = (Shift And vbAltMask) > 0
CtrlDown = (Shift And vbCtrlMask) > 0
If ShiftDown And CtrlDown And AltDown Then
mItSkill = mItSkill & Chr(KeyCode)
If UCase(Right(mItSkill, 5)) = "IAMIT" Then
cmdCalMonth.Caption = "计算报表"
Else
cmdCalMonth.Caption = "计算月报表"
End If
End If
Me.Refresh
End Sub
Dim mItSkill As String
Private Sub cmdCalMonth_KeyDown(KeyCode As Integer, Shift As Integer)
Dim ShiftDown As Boolean, AltDown As Boolean, CtrlDown As Boolean
ShiftDown = CBool(Shift And vbShiftMask)
AltDown = CBool(Shift And vbAltMask)
CtrlDown = CBool(Shift And vbCtrlMask)
If ShiftDown And CtrlDown And AltDown Then
mItSkill = mItSkill & Chr(KeyCode)
If UCase(Right(mItSkill, 5)) = "IAMIT" Then
cmdCalMonth.Caption = "计算报表"
Else
cmdCalMonth.Caption = "计算月报表"
End If
End If
End Sub
--------------------编程问答-------------------- cmdCalMonth_KeyDown
"_"前面是控件名字, 后面是触发事件, 顾名思义就是当按键按下的时候触发事件运行事件代码. --------------------编程问答-------------------- 那什么时候能触发呢 --------------------编程问答-------------------- 该控件keydown的时候…… --------------------编程问答-------------------- ctrl+alt+shift的时候吗
我按下任何一个键都会触发该事件
但是怎么实现ctrl+alt+shift同时按下呢???
补充:VB , 控件