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

Removing FoxPro main screen 4

Status
Not open for further replies.

nascent

Programmer
Jul 31, 2001
7
0
0
GB
I am working in FoxPro 2.6 for Windows for the first time, for a project.

I have created a few screens with a short controlling program. I have used commands like Clear Windows, Set Status Off, Set Status Bar off etc, but whenever I run the program, it does not come up in a window of its own on the desktop, but in a window of its own in the general FoxPro full size screen, which looks the same as the one in which you create everything.

The book says that I can use a command FOXPROSWX= -T which it says suppresses the FoxPro sign on screen, but says this has to be in the autoxec, so I am not sure this is what I am looking for.

What I need is a command which enables my first program window being run from my created .EXE file, to appear in its own window on my desktop, not apparently in a FoxPro screen.

Any help would be greatly appreciated. Thanks

Robin
 
Try using the following in your opening program.
modi window screen title "MYAPP"
and then call your main screen for your application.
Hope this helps
 
As an alternative you might use commands in the Config.FPW file. The commands are different slightly from what has been suggested for your main prg. -- check for help on configuration files or the resource books that came with your program. The config file will be read before Fox starts so you can avoid some of the flickering you might get if you wait until your main prg has control.
 
Nascent,
What the book is explaining, is that you can suppress the FoxPro logo screen by placeing the value -T after your calling program. There are actually a couple of options available, if I'm reading your question correctly.

It's not clear to me if you are creating a stand alone .EXE file out of your application, or if you are running Fox, and the running a compiled .APP. I'll talk to the first case first:

If you have compiled to .EXE, there are two solutions available to you. 1) in the FoxPro Project (That you open with MODIFY PROJECT <Project Name>, Select Project from the top line menu. Then, select Options from the drop down. A window will appear with a number of options. In the bottom right corner, there is a check box which reads &quot;Display Logo when application is Run&quot;. Make sure the check box is NOT selected. By default, it is. Recompile your application to a .EXE, and run it from whatever means you do (Desktop link, etc.) You will not have that window appear afterward. 2) Using a link that you establish from the desktop, edit the link so that it contains a -T after the name of the .EXE. This will have the same effect.

If you are running your app from FoxPro, and you simply want to start Fox without that anoying screen, use the same method I describe above, except that the link you are modifying is the link that runs FOXPROW.EXE. Again, simply edit the link, and place a -T after.

Now, another thing you mentioned in your message above causes me to belive that you don't want the app to run full screen. Prior to initiating your foundation read, you can issue the following command:

DEFINE WINDOW BACKGRND FROM 0,0 TO 120,340 FONT 'TimesNewRoman', 10 FILL FILE GRAPHICS\BACKGRND.BMP IN SCREEN

SHOW WINDOW BACKGRND

This will allow you to place a graphic (or color box, and it tiles it, so the full background is used), with a .BMP. Replace the &quot;GRAPHICS\BACKGRND.BMP&quot; with the location and file name of the .BMP file you want to use. Note that it must be a .BMP file. The caviate to this is, all of your READS must then be defined as MODAL, or you will get the unplesant side effect that if you click outside the window on the graphic that is now your background, your window will &quot;Disappear&quot;, and you may not be able to exit FoxPro. The problem here is that your window is not &quot;Gone&quot;, but placed behind the Graphic, and you now have no way to get it back to the foreground, so keep that in mind.

Please let me know if this helps.
-Scott
 
Thanks for the tips !

TheManiac's tip (1) got rid of the Foxlogo starting pop up.
I was then still left with the &quot;Microsoft FoxPro&quot; full size window in which my prog window appears as a child.

A combination of stuckwith2.6 tip and TheManiac's tip (2) gives the appearance of getting rid of the FoxPro window by, MODI WINDOW SCREEN TITLE &quot;MYAPP&quot; FROM 0,0 TO x,y. I eventually worked out that x and y need to be set so that the screen window is the same size as my apps first screen. This effectively makes the background foxpro screen disappear. The Screen window has to have a different name than the apps first window and the screen window name is left at the top. This means you lose your apps first window name, unless you size the window to give 2 title bars, which might be a bit confusing.

Anyway, thanks for the help !
Robin
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top