The GetKeyState function retrieves the status of the specified virtual key.
Virtual-Key Codes constants for Windows API Keyboard Input functions
VFP 9.0 version information for service packs and hotfixes.
An ActiveX installation on PC can be verified by finding its ProgID from OleClass property in the registry.
To distribute applications that use reports with custom paper size you have to create custom printer forms on every destination PC that runs Windows 2000 or later. The MS KB article Q157172 explains how it can be done manually. However there's a way to do that programmatically using Windows API.
The number of jobs in print queue can be retrieved by simplified version of Enumerating jobs in print queue