Ouverture de fichier

cs_Amadeus Messages postés 123 Date d'inscription mercredi 2 janvier 2002 Statut Membre Dernière intervention 15 mars 2004 - 6 mai 2002 à 17:42
cs_Nono40 Messages postés 962 Date d'inscription mercredi 3 avril 2002 Statut Membre Dernière intervention 12 septembre 2006 - 6 mai 2002 à 18:35
Comment par le code ouvrir un fichier texte dans NotePad.

merci

3 réponses

cs_Delphiprog Messages postés 4297 Date d'inscription samedi 19 janvier 2002 Statut Membre Dernière intervention 9 janvier 2013 32
6 mai 2002 à 18:27
NomDuFichier est du type String, par hypothèse :

ShellExecute( Application.Handle,
'open',
'Notepad.exe,
PChar(NomDuFichier,
Nil,
SW_ShowNormal);

May Delphi be with you.
0
cs_Nono40 Messages postés 962 Date d'inscription mercredi 3 avril 2002 Statut Membre Dernière intervention 12 septembre 2006 2
6 mai 2002 à 18:34
La fonction API ShellExecute permet de la faire :
ShellExecute(Form1.Handle,Nil,'C:\TEMP\ESSAI.TXT',Nil,Nil,SW_SHOWNORMAL);

Il faut ajouter ShellApi dans le Uses

--- :sleepy) Nono du Moulin :sleepy) ---
0
cs_Nono40 Messages postés 962 Date d'inscription mercredi 3 avril 2002 Statut Membre Dernière intervention 12 septembre 2006 2
6 mai 2002 à 18:35
C'est amusant, on à répondu la même chose au même moment...

--- :sleepy) Nono du Moulin :sleepy) ---
0
Rejoignez-nous