devxlogo

Displaying Windows While the Main Window Is Hidden

Displaying Windows While the Main Window Is Hidden

Question:
When I define a window “in desktop” with the main Visual FoxPro window hidden, I can’t get it to show up using Show Window or Activate Window while the main window is hidden. The only way I can get it to work is to show the screen and then hide it after it’s done.

Can I get it to appear without having to activate and deactivate the main window?

Answer:
Only forms that are “Top Level” forms can be visible when the main VFP window is not visible.

To make a form Top Level, set the ShowWindow property of the form to “2 – As Top Level Form”.

Another useful hint when dealing with Top Level forms is to put the following line into the CONFIG.FPW file of your application:

 SCREEN = OFF

This tells VFP to not show the main VFP window when the application starts, so it prevents the visual “flash” during the interval between when VFP is loading into memory and the execution of the line: _SCREEN.Visible=.F.

devxblackblue

About Our Editorial Process

At DevX, we’re dedicated to tech entrepreneurship. Our team closely follows industry shifts, new products, AI breakthroughs, technology trends, and funding announcements. Articles undergo thorough editing to ensure accuracy and clarity, reflecting DevX’s style and supporting entrepreneurs in the tech sphere.

See our full editorial policy.

About Our Journalist