Z napovedy jsem skusil narychlo toto.

Private Declare Function GetKeyState Lib "user32" (ByVal nVirtKey As Long) As Integer

Const VK_F1 = &H70

Private Sub Command1_Click()
Dim Key As Integer

Key = GetKeyState(VK_F1)

If Key And 1 Then
Text4.Text = "F1 is On"
Else
Text4.Text = "F1 is Off"
End If
End Sub

Zaloz si novy exe projekt, do formulare pridej jeden textbox a jeden command button.