>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,