Option ExplicitPrivate Sub Form_Load() Dim ow As New clsCommonWrapper Dim st As Integer st = ow.ShiftState() Dim bCtrl As Boolean Dim bShift As Boolean Dim bAlt As Boolean bCtrl = (st And vbCtrlMask) <> 0 bShift = (st And vbShiftMask) <> 0 bAlt = (st And vbAltMask) <> 0End Sub