Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Open a text file
Message
De
12/12/2003 15:33:20
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
 
À
12/12/2003 15:28:25
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00858757
Message ID:
00858763
Vues:
22
Another option is:
RUN /N notepad.exe MyText.txt
You may need to provide full paths.

In this solution (and the one I showed you before), VFP will not wait for NotePad or PFE to close - NotePad will be opened as a separate and independent program.

>Hi,
>
>I would like to be able to open up a text file from a VFP 7 form. I'm able to do so using this code:
>
>
>LOCAL lcFile
>
>lcFile = THIS.txtResults.Value
>
>IF !EMPTY(lcFile) AND FILE(lcFile) AND UPPER(JUSTEXT(lcFile)) == "TXT"
>  lcFile = "notepad " + lcFile
>  RUN &lcFile
>ENDIF
>
>
>However, when the above code is run you get the text file opened in notepad but you can see a DOS window in the background until you close the file. Is there any way you can do this without showing the DOS window?
>
>Thanks,
>Chris
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform