Hi Tim,
There are at least three API approaches to screen/form printing:
1) GDI API
2) Metafile API
3) GDI+ API
Metafile way is the shortest one.
GDI+ requires support class library. You may use either GDI+ foundation class (then you most likely limit yourself with just VFP9 because of BINTOC and other changes). There are several alternative GDI+ libraries though.
I have several code samples on my web site covering all three approaches (requires membership):
How to print FoxPro form -- this is GDI API
http://www.news2news.com/vfp/?example=158How to print FoxPro form -- II -- this is Metafile API
http://www.news2news.com/vfp/?example=406GDI+: sending image of FoxPro form to printer -- GDI+
http://www.news2news.com/vfp/?example=455Storing screen shot of a form to bitmap file -- GDI
http://www.news2news.com/vfp/?example=187GDI+: saving image of FoxPro form to graphics file (BMP, GIF, JPG, PNG, TIF) -- GDI+
http://www.news2news.com/vfp/?example=454When the title of example says "form" -- that means any valid window, including FoxPro main screen and Windows Desktop. Which handle you pass to a printing procedure, that window will be printed.
To get window's handle use HWnd property for Form and _Screen in VFP versions 7..9 . In VFP versions 3..6 use API functions GetActiveWindow, GetFocus, FindWindow, GetDesktopWindow instead.