Question:
Is it possible to completely hide the main Visual FoxPro window when I run an executable? In my main program, I use “_VFP.Visible = .F.”, but the main window appears for a few seconds when I first launch the executable.
Answer:
Here are the steps to fix the problem you are experiencing. Let’s say that you are creating an executable called MYEXE.EXE in a directory call MYAPP…
You need to use a configuration file with your executable. Create a file called config.fpw in the directory of your executable (MYAPP).
You need to tell Visual FoxPro to not show the main window. Put the following line into config.fpw:
SCREEN=OFF
Change the shortcut that calls your executable so that it uses the config.fpw file. For example, if the shortcut for your application runs the executable with this statement:
C:MYAPPMYEXE.EXE
Change the shortcut to:
C:MYAPPMYEXE.EXE -cCONFIG.FPW
Note that there is no space between the “-c” and the “CONFIG.FPW”.
Now when you run the executable from the shortcut, you will not see the “flash” of the executable window.