Microsoft KB Archive/156088

From BetaArchive Wiki
Knowledge Base


How To Hide Desktop in Run-Time (.exe) VFP5 Application

Article ID: 156088

Article Last Modified on 7/1/2004



APPLIES TO

  • Microsoft Visual FoxPro 5.0 Standard Edition
  • Microsoft Visual FoxPro 6.0 Professional Edition



This article was previously published under Q156088

SUMMARY

In Visual FoxPro 3.0, you can hide the Visual FoxPro desktop in your run- time application by setting the position of the desktop off the screen, for example:

   _SCREEN.Width = -1000
   _SCREEN.Top = -1000
                

However, in Visual FoxPro 5.0, you no longer have to do it this way.

MORE INFORMATION

In Visual FoxPro 5.0, you can easily hide the Visual FoxPro desktop in your run-time application by using the following steps:

  1. In the Start-Up (Main) program of your project, add the following line of code at the very beginning:

          _SCREEN.Visible = .F.
                                
  2. Then, create a Config.fpw file, and add the following line:

          SCREEN = OFF
                                
  3. Set the ShowWindow property of the Form to 2- As Top Level Form.

NOTE: If you do not plan to distribute the Config.fpw as a separate file, the Config.fpw can be included in the project as [Other][Text Files] or [Other][Other Files], and build it as part of the .exe file.

Keywords: kbhowto KB156088