It’s Impossible to Convert Visual FoxPro Automatically! That’s What I Was Told

posted in: Uncategorized 0

 

We have used several companies [over the past 5 years] to try and convert our existing VFP app to .NET and none have been able to achieve what Wes and his group have in just a few short months. They are diligent to be sure they are converting accurately and that the resulting code works as it did in VFP.  We’re happy to recommend Wes and his group.”Howard Bennett, President, Systemedic, Inc., Little Rock, AR

It’s impossible to convert Visual FoxPro automatically!  That’s what I was told.

After working on that for more than 5,000 hours, I am sorry to say that I have to agree with my expert friends.  However, a significant percentage can be converted automatically.  And that percentage increases each day as we continue to improve the auto-convert programs.

The above testimonial attests to that.

A well-written Visual FoxPro program can be converted at up to 50 percent less time using our automatic conversion programs and saving tens of thousands of dollars, and in some cases, hundreds of thousands.

●     We are able to automatically convert almost 100 percent of Visual FoxPro reports to C#.

●     We are able to automatically convert most Visual FoxPro forms to C#.

●     We are able to automatically convert much of the event code in the forms.

●     The parts that we cannot automatically convert are clearly marked for the programmer to finish manually.

●     We are able to automatically convert much of the programs (PRG’s).

●     We can automatically convert much of the program code even with Visual Maxframe.  Systemedic’s system (whose owner gave us the reference at the top of this post) is written using Visual Maxframe.

●     The code that cannot be automatically converted is clearly marked for the programmer to finish manually.

But what about the programs that are not well written? We have dozens of programs to help us analyze the project to determine how difficult it might be to convert. These include:

●     Identifying and counting the number of macros

●     Finding and counting functions embedded in reports

●     Counting the number blinds of program code

●     And dozens more

But before we begin auto-converting code, we customize our code to work with the new application. This is because there are so many different programming techniques used in Visual FoxPro. We will expand on this in future posts.

We also use dozens of programs to help with program estimating and program conversion. Below is a list of those that begin with A-F. G-Z will be listed in future posts. 

AC.PRG && generate a list of all controls by screen

ADDFIELDSTOTABLE.PRG && add fields to any table

ALLCONTROLS.PRG && list all controls by screen (SCX)

ALLEVENTS.PRG find and list all events in all scx files

ALLFORMS.PRG && find all forms and put in ALLFORMS.DBF

ALLFRXSINONEFOLDER.PRG &&

ALLLINESOFCODE.PRG && find all lines of code in all forms and programs

ALLMCFIELDS.PRG &&* allmcfiles.prg — find all fields in all dbfs and save to TABLE_NAME C(15),FIELD_NAME \

ALLPRGS.PRG && output all lines of code in all prgs and scxs

ALLPROPERTIES.PRG list all properties in all forms (SCX) by form with counts

ALLSCREVENTS.PRG && get all VFP events and store them in allevents.dbf

ASPIAPPCALLS.PRG &&

BRINGUPALLPRGS.PRG &&

CALLINGPROGRAMS.PRG &&

CODELINES.PRG && list all prgs and get number of lines of code for each. Helpful for estimating.

CONVERTRPTS.PRG &&* convertrpt

CONVERTTXT.PRG &&* converttxt.prg

COUNTALLLINESOFCODE.PRG &&* countalllinesofcode.prg — count all lines of code in all prgs and scxs

CREATECS2.PRG && this is the main program used to convert programs and event code

CREATEFORM.PRG && this is the main program to create forms

CREATEMENUDOC.PRG &&

         A sample of the output is listed below. It generates the prompt seen on a menu and the command that is executed

         Prompt: Print Pre\

         Prompt: E\

Prompt: Bill Review Summary/Invoice Command: oMenu.DoForm(“RPTPBRSUMMARY”,”F”,.t.)
Prompt: NDC Codes Used Command: oMenu.DoForm(“RPTNDC”,”F”,.t.)                                                             
Prompt: Network Access Report Command: oMenu.DoForm(“RPTNETACCESS”,”F”,.t.)                                                 
Prompt: WC Price Percent Change Report Command: oMenu.DoForm(“RPTRVUCHANGES”,”F”,.t.)           

FINDASTRINGINALLSCXANDPRG. && find a string in all scx’s and prg’s         

FIND1FIELDALLDBFS.PRG && find one field in all data fields

FIND1FIELDALLFILES.PRG && – find one string in all files

FINDALLFILES.PRG

FINDALLSUBFOLDERS.PRG find all sub-folders and their scx and prg files

FINDALLFILESINALLFOLDERSFORONE.PRG find all files in all folders

FINDALLFILESINALLFOLDERSFORONEPROJECT.PRG && find all sub-folders and their scx and prg files

FINDALLINFRX.PRG && – find all fields in all frx’s

FINDALLOBJS.PRG && find all objects on all screens

FINDALLRPT.PRG && where crview is called from either a prg or scx

FINDALLTAGS.PRG && find all tags in all cdx files

FINDFUNCTIONS.PRG && find all functions

FINDMACROS.PRG && find all macros in all prgs

FINDPUBVARS.PRG find all public variables in all programs