Microsoft KB Archive/266377

= PRB: .Exe File Created in Visual FoxPro Doesn't Appear on Screen =

Article ID: 266377

Article Last Modified on 7/1/2000

-

APPLIES TO


 * Microsoft Visual FoxPro 6.0 Professional Edition

-



This article was previously published under Q266377



SYMPTOMS
When you use the Application Wizard to create an application, it creates a Config.fpw file in the same folder. If the main program is changed to another file in the application's project and an .exe file is built, then the .exe may not show up on the computer screen when it is run. The .exe name shows up in the Task Manager as running, but it is not accessible. This behavior can also occur when other .exe files that have been built using the Project Manager read this Config.fpw file.



RESOLUTION
If another file is used as the main program in a project built with the Application Wizard, remove the SCREEN=OFF command from the Config.fpw file.



STATUS
This behavior is by design.



MORE INFORMATION
As the Application Wizard builds all the necessary files for the application, it creates a Config.fpw file with the SCREEN=OFF command in it. This command turns off the background of the Visual FoxPro library. The main program that the Application Wizard originally builds knows that SCREEN=OFF is in the Config.fpw file and has the necessary code built into it to allow the .exe to appear properly. Changing the main program in the project to another file causes the .exe to not appear on the screen because the background of the Visual FoxPro library has been turned off by the SCREEN=OFF command.

Note that if an .exe is run that has a form as the main program and its ShowWindow property is set to As Top-Level, then SCREEN=OFF should not be remarked out.

Steps to Reproduce Behavior

 * 1) On the Tools menu, select Applications, and then click to select Wizards. In the text box of the Application Wizard dialog box, name your project MyApp, and then click OK.
 * 2) Click OK in the Application Builder dialog box.
 * 3) Select the Code tab in the Project Manager, and then click New. Add a WAIT WINDOW command in the dialog box.
 * 4) Close the dialog box and save it as Mymain.
 * 5) Right-click on the Mymain file and select the Set Main menu item.
 * 6) Click Build, and create a Win32 executable, saving it in the current folder.
 * 7) Run the .exe and note that it does not appear, but runs as a process in memory. You can check this in the Task Manager (CTRL+ALT+DEL).
 * 8) To allow an .exe to appear, modify the Config.fpw (usually in the same folder as the .exe), and remark out the SCREEN=OFF command. Note that the .exe appears as expected.

Keywords: kbxbase kbprb kbwizard KB266377

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.