Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Best way to incorporate form in 2nd EXE
Message
De
14/02/2014 09:54:54
 
 
À
14/02/2014 09:46:42
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Network:
Windows 2003 Server
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01594298
Message ID:
01594299
Vues:
61
>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:
* There's also a create process class around somewhere that you could use instead of RUN
RUN /N my2nd.exe myForm foo.dbf

* As first source code line of my2nd.exe:
LPARAMETERS pcFormName, pcTableName

    DO CASE
        CASE LOWER(pcFormName) = "myform"
            DO FORM myForm WITH pcTableName
    ENDCASE

* The pcTableName indicates a file that contains parameters you would've passed to that form, if any
This will allow the my2nd.exe program to launch and go immediately to the indicated form.

Hope this helps.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform