出于某种原因,我的选择案例不起作用。我敢肯定这很愚蠢。这是我所拥有的:
Private Function getVirtualCommand(ByVal command As String)
Dim virCommand As String
Select Case virCommand
Case command = "A"
virCommand = VK_A
Case command = "B"
virCommand = VK_B
Case command = "C"
virCommand = VK_C
Case Else
MsgBox("The key command " + command + " is not listed. getVirtualCommand()", MsgBoxStyle.OkOnly, "Error")
End Select
Return virCommand
End Function