Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Binding Files
Message
De
16/02/1999 12:57:21
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
00188026
Message ID:
00188043
Vues:
20
>If I were to have an EXE file call another EXE or APP file, shouldn't the files in the second file (APP or EXE) be visible?
>
>I have a generic application which I want to call specific app or exe files that add a menu pad to the host application. This part works well, however, when I try to use the options in the new menu which is added by the second application, I get errors telling me the files are not found (screens, reports, menus, programs, etc).
>
>These files were included in the project that was used to build the app.
>
>I even tried to set procedure from the host application to the app file without luck. The only solution seems to include all source files with the app or compile the app into the host project which makes a terrible mess of the host project file and defeats the purpose of seperate app files.
>
>Please!
>What is the solution?

You could use a "loader" program in each .APP file that calls the Form, Program, Report, whatever. This would be the "main" .PRG of your .APP.
MyApp.PRG
LPARAMETERS cType,cRunThis
DO CASE
  CASE cType='FORM'
    DO FORM (cRunThis)
  CASE cType='PROGRAM'
    DO (cRunThis)
  CASE cType='REPORT'
    REPORT FORM (cRunThis)
  * etc...
ENDCASE

And in your Menu, call them:
  DO MyApp WITH 'FORM','MyEntryForm'
  DO MyAPP WITH 'PROGRAM','MyProgram'
  DO MyApp WITH 'REPORT','MyReport'
  etc...
Running the "Main" for your .APP will bring all the .APP's forms, programs, etc into scope so they can be executed.
Fred
Microsoft Visual FoxPro MVP

foxcentral.net
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform