呵呵,刚好我前几天写了一个相似的,画个timer
Private Declare Function GetAsyncKeyState Lib "user32" Alias "GetAsyncKeyState" (ByVal vKey As Long) As Integer
Private Sub Timer1_Timer()
x = GetAsyncKeyState(111 + 12) 'f12
If x = -32767 Then text1.text="的内容为你按了F12"
End Sub
GetAsyncKeyState 参考 http://baike.baidu.com/view/1467704.htm