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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Getting rid of standard FoxPro screen 1

Status
Not open for further replies.

GEThomas

Programmer
Nov 14, 2004
3
0
0
US
I am a new FoxPro programmer and am trying to get rid of the standard FoxPro screen when my program calls my form.

Of course, I can click on the minimize button and kinda get rid of the screen, but I don't want it to show at all when I execute my form. I just want my screen to appear and that's all.

What can I do?

Thanks.

 
Hi

Somewhere in your main.prg, you can add the code..

_screen.Visible = .f.

If you dont want even the flickering of the VFP screen, when the application is started.. add the code..

_SCREEN.Visible = .f.
IF !FILE("config.fpw")
=STRTOFILE("SCREEN=OFF","CONFIG.FPW")
ENDIF
(The above will create a config.fpw file if it did not exist.

If you already have config.fpw then add the line
SCREEN = OFF in config.fpw

:)

____________________________________________
ramani - (Subramanian.G) :)
 
Do you mean you want your form to display and not the VFP desktop(_screen).

If so, you can set your form to be a top level form.
i.e.:
WindowState = 2
Desktop = .t.

And as Ramani says, set screen off in the config.fpw

Darrell
 
ejhemler

You can also use screen.hide()

This suggestion should throw an error, unless you use an underscore in the begining

Code:
[b][red]_[/red][/b]screen.hide()

Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
 
Easiest way is to create a config.fpw as was suggested above with the line SCREEN=OFF in it and then add/include this config.fpw in your project under the Other Files section. This will allow VFP to compile the config.fpw into your executable when built and there will be no need to distribute the config.fpw file with your application's install. Also, set your form's ShowWindow property to 2 - As Top Level Form. This will allow your form to exist outside of the _screen.

There are some additional things you may need to do. Such as creating a main.prg with a foundation read in it right after you call your form (assuming that your form is modeless). It would look something like the following:

Do form MyForm && do MyForm.scx

Read Events &&Foundation Read


...then in your form's destroy event put the following:

Clear Events && Clears Foundation Read allowing program to quit


boyd.gif

 
right, thanks mike for clearing that up. I forgot about the underscore.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top