Retrieving Windows system error message
The WIN API FormatMessage function (among other things) can retrieve message definition from an already-loaded module or the system's message table. The error code usually is provided by the GetLastError
WIN API function.
Move Form without Titlebar
The code below shows how a form without titlebar can be moved with a mouse. It uses ReleaseCapture and SendMessage Windows API functions and based on How to Move a Form that Has No Titlebar or Caption.
Determine Printer Margins Programmatically
The GetDeviceCaps function can be used to retrieve printer-specific information as demonstrated below.
Detect Multiple Monitors
The GetSystemMetrics WIN API can be used to get the number of monitors. Some other constants related to multi-monitor PC configurations are also included.