Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Opening INI files along with the EXE one
Message
 
À
14/04/1999 17:07:13
Pascal Binette
Pratt & Whitney Canada
Saint-Hubert, Québec, Canada
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00208396
Message ID:
00208480
Vues:
26
>Is there a way of opening an INI file automatically when you run an application that has the same name? I know some other languages such as Delphi have a command for that, but there does not seem to be one in VFP. I looked at the GetPrivateProfileString API function, but you have to specify the path of the file, which is what I want to avoid.

SYS(16,1) will return the full path to the exe. All you then do is replace EXE with INI and you have your full path to ini file. Then you use GetProfileString with this. That's the way I do it (although I've written my own wrapper class for ini files).

Hope this helps,
Nigel B Coates
NBC Software Services
Dublin, Ireland.
eMail: Nigel.Coates@NBCSoftware.com
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform