If there is a form that has focus when you press F12 set it's keypreview to true and then handle your events in the keydown or keyup events (keycode = vbKeyF12)

if there's no form that has the focus you use:

Code:
Public Declare Function RegisterHotKey Lib "user32" (ByVal hWnd As Long, ByVal id As Long, ByVal fsModifiers As Long, ByVal vk As Long) As Long
Public Declare Function UnregisterHotKey Lib "user32" (ByVal hWnd As Long, ByVal id As Long) As Long


[This message has been edited by Inhumanoid (edited 11-26-1999).]