Hi Chris,
Check if this example helps
http://www.news2news.com/vfp?example=49"Defining a window type of the main VFP window"
For VFP6 the code returns
Window Type: VFP66400000
Window Text: Microsoft Visual FoxPro -- actually same that _SCREEN.Caption returns.
Window handle returned by the GetActiveWindow fuction is used.