Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Running foxpro for DOS programs in Visual Foxpro

Status
Not open for further replies.

decegenldo

Technical User
Dec 2, 2007
1
US
Hi friends
I have a working system developed in foxpro for DOS. It has several programs starting with a menu.prg and other prgs for each option in the main menu.
Lately I have the need to run this system on Visual Foxpro 7.0. The reason is that I want to use what I already have and add some reporting and exporting features of the Windows version, so I can have it working faster than rewrite everything.
Thanks for your help
 
Have you tried running the DOS program? Many straightforward programs from FoxBase onwards will run in VFP. Some have problems with printing or with the size of fonts but you might be lucky.

Geoff Franklin
 
Decegenldo,
As State by alvechurchdata, the DOS code will run in VFP7 with no problems. The hickups will be in the DBF files and report forms and screens (DOS Windows).

If your application needs a DBF exclusive, and VFP runs it, When it goes to open the DBF exclusive for the First time you will be asked to assign a Code page. Or the Program will Crash, depends on how you wrote the code and your error trapping. Once you assign a Code page DOS will never be able to open the DBF's again. The Commands that will cause the Code page to be assigned are
USE xxx EXCLISIVE.
ZAP
PACK
INDEX
REINDEX
CREATE

You can write a DOS program that handles the back end Deleting of records and packing. Then VFP7 will run the code fine.

The Print Reports should be rewritten in VFP7.

The Screens will run fine, They will just look very Nerdy, because of the Windows handling of DOS windows.

So before you do this, MAKE SURE YOU HAVE A BACK UP COPY OF YOUR DBF FILES IN DOS.


David W. Grewe Dave
 
David,

[Once you assign a Code page DOS will never be able to open the DBF's again.]

Not so. I regularly open FPD26 dbf files in VFP6, assign a msdos code page (437), and it is still OK in my FPD26 system.
DO NOT convert 3.0 resorces to 6.0 format though.
Ken F
 
Thanks Ken, Never thought of trying that.


David W. Grewe Dave
 
A good way to prevent the modification of dbf files from 2.xx to upper version is to add at the begining of the old program the lines :
Set CPdialog off

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top