1、
Private Sub Text1_KeyPress(KeyAscii As Integer)
If KeyAscii >= Asc("A") And KeyAscii <= Asc("D") Or KeyAscii >= Asc("a") And KeyAscii <= Asc("d") Then KeyAscii = KeyAscii + 4
End Sub
2、
Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = vbKeyF6 And Shift = vbShiftMask + vbAltMask Then
Print "再见!"
End
End If
End Sub
3、
Private Sub Form_KeyPress(KeyAscii As Integer)
Print "&H" & Hex(KeyAscii), "XO" & Oct(KeyAscii)
End Sub
本文如未解决您的问题请添加抖音号:51dongshi(抖音搜索懂视),直接咨询即可。