You cannot compile a FoxPro DOS application with any version of Visual FoxPro (the latest would be VFP 9) without making code changes. Otherwise you will run into several issues:
Visual FoxPro lets users resize the window whereas DOS applications are usually designed for a fixed width and length (80x25 or 80x55 typically). When you make a VFP window smaller and then enlarge it again, anything printed on the screen in the area that was temporarily hidden is erased.
Functions like SCOLS(), SROWS(), WCOLS(), and WROWS() return fractional values. In DOS they only return integer values.
The default font in Visual FoxPro is a proportional font and now a mono-spaced font.
A number of commonly used commands are not working like SET BLINK or SAVE SCREEN.
FoxPro DOS applications use special graphic characters like single and double lines to draw dialogs. These characters are not available in Windows. There is a font called FoxFont which includes some of those, but this font doesn't work with different code pages and is also a pixel based font rather than a TTF.
FoxPro DOS uses a different code page than Windows. This renders code unusable where you compare with a specific binary value with a character in code. If your tables do not have a code page then you will see wrong data on the screen for any character that has a different ANSI code. If your tables do have a code page then you will trash your binary data.
DOS application use TLB and BIN libraries instead of FLLs. Any third party tool needs to be replaced.
A lot of @... commands do not work in Visual FoxPro 9 anymore. Cursors disappear, random text is cleared. This is because internally the controls that FoxPro DOS used are matched to VFP controls in a special compatibility mode.
There was no message loop in DOS. Therefore code might loop in order to wait for input. This works in DOS, but will cause your Visual FoxPro application to run at 100% CPU usage and become unresponsive.
The printer operates differently in Windows. Using the same printer settings as in FoxPro DOS will result in different output or no output at all. Several system variables that control printing in DOS do not work at all in Visual FoxPro.
Switching from FoxPro DOS requires a significant rewrite to run in Visual FoxPro depending on the complexity of your application.