>When the compiled .exe runs, I get an error message that says:
>"LOMESSAGE is not an object" but all is well when I run it from within vfp environ (command propmt)
>
>the code is as follows and was always working till today. I've rebuilt the project to no avail. I wonder what the cause is?
>
>loMessage = newobject("Animation", "Animation.vcx", "", ; && Now use Daniel's vcx class instead
>'Saving record...', ;
>'RECORD SAVE IN PROGRESS', ;
>'fish.avi')
>set message to ' Saving record...'
>loMessage.show()
>for t= 1 to 21000000
>next
>retuI don't know the library in question, but obviously something changed in Animation.vcx that precluded its instantiation.
You should add error checking to your code, either a Try..catch block, or at least a:
If VarType(loMessage) != "O"
Return .F.
Endif
Another tip: To create a delay is better to use the Sleep API instead of an empty loop (your For..Next example) as that one eats more processor cycles.
DECLARE Sleep IN Win32API INTEGER nMilliseconds
nSleepSeconds = 5
nMilliseconds = nSleepSeconds * 1000
=Sleep(nMilliSeconds)
HTH