'"ClippyBoard" program uses GetKeyState Win API to monitor a specific key combination.
'This demo will maximize the window and focus on program when Shift+A is pressed.
FUNCTION GetForegroundWindow%&
'find currently focused process handle
title$ = "Clippy Clipboard (Ctrl+Shift)" 'title of program window
_TITLE title$
'set program title hwnd%&
= FindWindowA
(0, title$
+ CHR$(0)) 'find this program's process handle