Question is not easy and it is very tricky, please, read carefully (I will try to describe problem with my knowledge of English). 4 well experiensed VFP programmers tried to find a solution for this problem and have no success.
We have very dynamic application that runs some programs on When event or validation of form fields. These programs are subject of often changes (say, they contain functions with SQL-SELECT queries). We need to set this PRG file as procedure file.
PROBLEM:
In RUN-TIME, SET PROCEDURE command do not set external procedure .PRG file when it is not pre-compiled to .FXP file. Looks like VFP try to find .FXP file by .PRG file name in the project compiled into EXE file, not on the disk. So it shows message like "File 'MyProc.PRG' does not exists", without path. Path specified exactly, either macro ('&') or expression/variable do not work in this command.
Ok, we use COMPILE command to pre-compile PRG file. However, it always shows compilation progress window. It blinks for the moment, that may not be a problem. The problem is that we need to lock screen from refreshes (thisform.lockscreen = .T.) during some process. When we compile something during that process, compilation window shown and than left on the screen until LockScreen will not be set to .F., showing garbage to users. We tried all combinations of all settings in VFP and did not found a way to hide it by VFP commands.
QUESTION:
How to hide compilation window of COMPILE command in run-time? Maybe someone know some tricks using old VFP commands that work with windows?
NOTE: Please, do not propose solution with running of VFP Automation Server object and compile PRG file using 'DoCmd'. It is too slow to load this object each time when compiling, and too memory-consuming to keep it running from start of application just to hide compilation window.
NOTE2: VFP does not show compilation windows when program is very small. Sure, whe I use SET PROCEDURE command in design-time, little program compiled without any messages. However, COMPILE command in run-time shows compilation progress window ALWAYS despite size of PRG file.
NOTE3: Solution with hiding of main VFP window and make another window at desktop does not works too. VFP shows compilation progress at desktop!
We have very dynamic application that runs some programs on When event or validation of form fields. These programs are subject of often changes (say, they contain functions with SQL-SELECT queries). We need to set this PRG file as procedure file.
PROBLEM:
In RUN-TIME, SET PROCEDURE command do not set external procedure .PRG file when it is not pre-compiled to .FXP file. Looks like VFP try to find .FXP file by .PRG file name in the project compiled into EXE file, not on the disk. So it shows message like "File 'MyProc.PRG' does not exists", without path. Path specified exactly, either macro ('&') or expression/variable do not work in this command.
Ok, we use COMPILE command to pre-compile PRG file. However, it always shows compilation progress window. It blinks for the moment, that may not be a problem. The problem is that we need to lock screen from refreshes (thisform.lockscreen = .T.) during some process. When we compile something during that process, compilation window shown and than left on the screen until LockScreen will not be set to .F., showing garbage to users. We tried all combinations of all settings in VFP and did not found a way to hide it by VFP commands.
QUESTION:
How to hide compilation window of COMPILE command in run-time? Maybe someone know some tricks using old VFP commands that work with windows?
NOTE: Please, do not propose solution with running of VFP Automation Server object and compile PRG file using 'DoCmd'. It is too slow to load this object each time when compiling, and too memory-consuming to keep it running from start of application just to hide compilation window.
NOTE2: VFP does not show compilation windows when program is very small. Sure, whe I use SET PROCEDURE command in design-time, little program compiled without any messages. However, COMPILE command in run-time shows compilation progress window ALWAYS despite size of PRG file.
NOTE3: Solution with hiding of main VFP window and make another window at desktop does not works too. VFP shows compilation progress at desktop!