Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Do Not Show The Main Top Level Form (_SCREEN)

Status
Not open for further replies.

TGrahmann

Programmer
Feb 19, 2015
43
US
Hi, Guys. I need to know if there is a way to make a "standalone" so-to-speak. I want just 1 top level form for my application, so I don't want the one that is automatically generated (_SCREEN) is there a way to make it non-visible?
P.S.: I tried _SCREEN.Visible=.f. It didn't work
 
[tt]_SCREEN.Visible = .F.[/tt] should have worked. If it didn't, you probably made some mistake, perhaps with the syntax.

That said, a better option is to put [tt]SCREEN = OFF[/tt] in your Config.FPW file. (If you don't know how to create a Config.FPW file, check the VFP Help.) Be sure to bind the file into your final executable.

The advantage of this approach is that the user will never see the main screen. With [tt]_SCREEN.Visible = .F.[/tt] they will see it for an instant before VFP has a chance to suppress it.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads
 
One reason _Screen.Visible = .f. won't work is when you diddle with _Screen.Windowstate. Once you change .WindowState, it'll show itself because you told it to.

As Mike says, it's better to set SCREEN = OFF in config.fpw (and probably RESOURCE = OFF, among other settings). Then you don't need any code because it'll never be visible (unless you diddle with .WindowState).
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top