You're right. Unfortunately I don't remember how I did it even if I succeded or not:(
Cetin
>Cetin,
>
>
>ON KEY LABEL F8 DO x:\test.prg
>
>* x:\test.prg
>SET LIBRARY TO (home()+"foxtools.fll")
>LOCAL lihwnd
>LOCAL ARRAY laEnv(25)
>lihwnd=_WonTop()
>IF lihwnd>0
> =_edGetEnv(lihwnd,@laEnv)
> ?laEnv(1)
>ENDIF
>
>
>Function _edGetEnv() return only file name - without folder.
>
>MartinJ
>
>>>I'm working on a tool to analyze code, and am looking for a way to close down the prg file prior to analysis and reopen after analysis has completed. There are multiple solutions with VCX's and SCX's, but I haven't seen a solid way to get the full path for a prg.
>>>I can use FULLPATH(WonTop()), but if I have more than one PRG with the same name there is no guarantee I will pick up the correct PRG - or if the prg isn't in a folder in the path. Are there any VFP built in functions (e.g. like ASelObj()) which will give me a full filename and handle to the prg? Any API calls?
>>>
>>>Michael
>>
>>Michael,
>>Check _Ed* foxpro API. I remember I did something similar with one of them.
>>Cetin