Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
'MODI FILE' from a top level form
Message
De
06/09/2002 12:41:17
 
 
À
06/09/2002 12:10:49
Michael Devlin
A. James de Bruin & Sons - Llp
Bethpage, New York, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00697594
Message ID:
00697616
Vues:
14
You can use filetostr() to put the file into a variable (a form property would work great). Use an editbox on the form (as Caroline suggested), with the controlsource pointing to the form property I mentioned previously. Use strtofile() to write back to the file.

You may want to fopen() the file after filetostr() to prevent other users from editing the file (fclose() just prior to strtofile()).



>Here is a question. How do I modify a file from a top level form?
>I have a top level form set up as a standalone EXE, which opens a file and runs a program that generates cursors based on the file. The form has command buttons which preview reports based on the generated cursors. I have code in the command click events to resize the form to allow the report preview to be viewed, since the DEFINE WINDOW does not make a new window on the desktop even when I include the IN DESKTOP clause. That solved the problem of viewing the report previews, not the solution I wanted, but it works. Now I am confronted by the fact that I want the user to be able to edit the file from another command button on the form, to make changes based on the data displayed in the form reports. The problem of not being able to DEFINE WINDOWs in the desktop has stopped me cold. No matter what I try, the MODI FILE command will not display the edit window anywhere except the default FoxPro _screen. Since the form is running as a standalone top level form, I have not been able
>to figure out how to include this functionality.
>I have been trying to create a NotePad object, but these attempts have been unsuccessful.
>Please help.
>
>Mike D.
>mdevlin@ajdebruin.com
Steve Gibson
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform