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

Controlling FoxPro blank screen at run time

Status
Not open for further replies.

bfwriter

Technical User
Jul 22, 2006
35
US
Hello friends,

A chronic confusion for me is how to control Screens and ShowWindows. Here is a recent example that illustrates the problem.

I have a simple one-form app which I want to be callable at any time (even when not using FXP). I want the form to appear on my desktop (without the FoxPro screen) then go away when QUIT is issued. The problem is how to show the form without the FoxPro screen.

What I am getting is the white FXP screen with its menubar which shows smaller than my monitor; then inside the white screen is my Form, giving the appearance of a Form upon a Screen upon the Desktop.

I have played around with many variations in ShowWindow, WindowState and WindowType and it seems to make no difference. This annoying white screen wants to remain.

How should this be done?

Thanks.
 
Many thanks for your answer Geoff. Those are indeed my settings. I went back and checked after your note, and just to be sure confirmed that my Config.fpw file with SCREEN=OFF is the one being used. All that seems to check out, but the problem remains.

Any other thoughts.
Thanks.
Ben
 
The fact that the desktop is showing up, with the form inside of it suggests that the form is NOT actually using ShowWindow = 2.

If your config.fpw file does have SCREEN=OFF and is being used, the only way that you could get the VFP desktop back is if you have this code somewhere in your startup program or form Load/Init:

_Screen.Visible = .T.

I suggest that you re-check things, because SCREEN=OFF and ShowWIndow = 2 is definitely going to get rid of the desktop. If it fails, you have one or other wrong I am afraid.


----
Andy Kramek
Visual FoxPro MVP
 
We use this where we have low security access and want to hide the screen based controls.

Your form, as Andy says, needs ShowWindow=2 also
set Desktop=.f.
borderstyle=0
windowstate=0
Maxbutton=.f.

Issue HIDE WINDOW SCREEN immediately after your Form call and before READ EVENTS

Bob Palmer
The most common solution is H2O!
 
This is the one FAQ I wrote...

faq184-6512

This will create the needed structure. Take a look at what properties are set in the main form, configure your form the same and replace the main form of the project.

Bye, Olaf.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top