>I want to add functionality from one of my applications (an accounts app) into another.
>
>I know I could just add all the code and forms to the 2nd EXE but that would make the EXE very large and maintenance much harder. I have played with "DO mProcess IN .." etc. but most of what I want is calling forms not procedures and there is no "DO FORM MyForm IN ..."
>
>I know I could make things OLE public and do createobject() but I don;t want the overhead and the loss of direct control that offers.
>
>Interested to know what others do and what the performance hit is?
>
>Gary.
Having a large .EXE file is not a big issue. The typical way to handle updates in a multi-user environment is to use a launcher.exe app which determines which version should be run (the latest, for example) and then launches it. That way every time you release a new version, just copy it to their exe\ folder and then have them restart the app.
In the alternative, pass the name of the form you want to run as a command line parameter:
RUN /N my2nd.exe myForm foo.dbf
LPARAMETERS pcFormName, pcTableName
DO CASE
CASE LOWER(pcFormName) = "myform"
DO FORM myForm WITH pcTableName
ENDCASE
This will allow the my2nd.exe program to launch and go immediately to the indicated form.
Hope this helps.