Thank you, John.
>Hi Dmitry,
>
>>>Do, you clear DLLS before every call?
>
>No- the first time you call ShellExecute() the VFP function is called, which declares the API ShellExecute. After that, including when ShellExecute is called from the VFP function itself, the declared function takes precedence.
>
>If you did CLEAR DLLS then the VFP function will be called again next time.
>
>The technique means ShellExecute doesn't need to be Declared unless/until it is needed, and you shouldn't ever see the "function not found" as long as the VFP function is in a SET PROC or included in your project. The function is also only ever declared once rather than repeatedly as you sometimes see when people want to make sure it is declared, since DECLARE definitely carries a performance hit.
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham