>for resolving your first problem, try this:
>SYS(5)+SYS(2003)+"\"+WTITLE() returns Full path with the .prg name
>WTITLE() returns the caption of the active window, while this isn't maximized.
I was not clear enough, sorry.
I did not find a way to find the Active window, and to react if I get some event when it changes, the way the Native Document View (NDV) does. As soon as you click in a different form/class/program (FCP) the NDV refreshes with the contents of the FCP that has been activated, this is what I could not simulate.
"The five senses obstruct or deform the apprehension of reality."
Jorge L. Borges?
"Premature optimization is the root of all evil in programming."
Donald Knuth, repeating C. A. R. Hoare
"To die for a religion is easier than to live it absolutely"
Jorge L. Borges