>>Using VFP 6.
>>
>>I am trying to right-click and execute a blocked set code. However, if you use constants, like MB_ICONQUESTION, the execution gives an error on the constants. I have found this to be true even if your _Include system var is set to Home() + "foxpro.h" and the form or form class has the foxpro.h file as its include file. It even errors if you exlplicitly add a line of code #include home() + "foxpro.h" at the beginning of the blocked set of code.
>>
>>Has anyone found something that works so code testing can be done with the right-click, execute? Or am I stuck with copy-and-paste to a prg and run it that way so it compiles? Looks like this neat feature is not doing any compiling.
>>
>>TIA.
>
>It does work if you explicitly have
#include c:\visualstudio\vfp98\foxpro.h as the first line of the blocked code. To me, this defeats the purpose of having the _include and the ability to specify a form's include file.
Mark,
When you run a block of code it essentially creates a temporary .prg from the blocked code, compiles it, then runs it. I haven't tried this, but I think you'll also find that any references like THISFORM won't work either.