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

How do I get a full screen (like old FPD2.6)

Status
Not open for further replies.

FoxEgg

Programmer
Mar 24, 2002
749
AU
I would like to have a startup screen with no [START} button and no minimalizaton and no X buttons in the top right corner ... a bit like the typical screens of FPD2.6

(I am a slow learner of VFP, no not true... a very very slow learner)

Thnnks in advance

John Fox
 
In your main form (or _Screen.) Set the properties:

CLOSEABLE = .F.
MinButton = .F.
MaxButton = .F.

Best Regards,
Scott

Please let me know if this has helped [hammer]
 
FoxEgg,

Oh, also if you want it to "Take over" the whole windows screen space, issue (Just like in ol' 2.6 days)

ZOOM WINDOW SCREEN MAX

(When on your main screen).
Best Regards,
Scott

Please let me know if this has helped [hammer]
 
Under VFP5, I ran

ZOOM WINDOW SCREEN MAX

from the command window ... no reaction
defined a window, I ran

ZOOM WINDOW SCREEN MAX

no reaction

I even wrote a small routine.....nyada nix nihil

OK so I am a VFP Klutz

I also tried the following

CLOSEABLE = .F.
MinButton = .F.
MaxButton = .F.

no reaction...

Should I return to 2.6





 
Foxegg,

On VFP screens there is a property called "WINDOWSTATE". You can set it to 2 (Maximized). That works for me.

Good Luck [spidey] [americanflag] [unclesam]
 
FoxEgg,
Hmmm very peculiar. However, I may be building my foundation slightly different from yours, I'll give you "The big picture" here...

I have a startup that does the followin:

STARTUP.PRG

IF NOT glQUITAPP
DO MAINMENU.MPR
DO FORM SPLASH
DO FORM MAIN
READ EVENTS
ENDIF

Now, my "Form MAIN" is an actual Form. I know some people create their "Backgrounds" programatically, and then use the _SCREEN object to make changes to their "Parent". I choose not to do this, I like haveing a FORM to control via properties instead. In this case, I also have a bit of code in the INIT event of my MAIN form, that says:

IF PRODUCTION
ZOOM WINDOW SCREEN MAX
ENDIF

This is just a little thing I have built in, note that PRODUCTION is the name of a control field that I have created in a much larger Framework, and I won't go into that here... but, you can just as easily take my IF statement off, and always force your window to MAX size. It's important that this be in the INIT of your TOP PARENT form only. This works like a charm for me, every time.
In any FORM that you have, go and set the MinButton, MaxButton, and Closeable values to .F., and you will see that the set of 3 buttons is not there when the form is created.
As far as my MAIN form goes, I allow the user to close, but I have some code in my DESTROY() event to handle users just clicking to close the app at any moment. (It will close tables gracefully, and allow them to save anything they are working on if they are in edit mode). Again, not something you need to do specificaly, but is a little more "Standard" in the current Windows environment. The code is not at all complex, and I'd be happy to post it here for you if it will help as well.
At all cost, please, please, please don't go back to 2.6! I've just made the leap myself from 2.x to VFP, after about my 7th attempt at doing so. It is well worth the extra effort, and besides with Tek-Tips here, every question you can possibliy answer about getting "Stuck" along the way, I assure you, someone here can answer!

Best of luck.

Best Regards,
Scott

Please let me know if this has helped [hammer]
 
Remember to set the screen properties be sure to

with _screen
.CLOSABLE = .F.
.MinButton = .F.
.MaxButton = .F.
.WindowState = 0 && Restore
.WindowState = 1 && Minimized
.WindowState = 0 && Maximized
endwith


>>> Should I return to 2.6
No, you shouldn't. Just keep alot of plaster handy to fix the holes in the wall where you will be banging your head [wink]
HTH,
Matt

 
Gentlemen,

I am grateful for your FPD2.6 to VFP transition encouragement and have made a decision to learn this VFP mongrel. Even found some user groups in Oz (Australia) and I'll pay to learn.....

Spent all day bashing my head.... (I am an Engineer and a Surgeon and VFP is the great equalizer)

I am sure you guys are right....

I can do it I CAN DO IT I CAN I CAN DO IT

But I am damned if I can get rid of the [START] button and get TRUE full screen


John Fox

jfox2@bigpond.net.au
 
John,
Where in Oz are you? I just moved here 3 months ago, and am looking for other Fox'ers in Oz. I'm currently on the Gold Coast, but will be moving (somewhere....) in the next few weeks. e-mail me at scottvpayton@hotmail.com if you'd like to discuss futher. I'm interested also in establishing a VFP user group... who knows, you and I may be the chater members... hehe

(Sorry to everyone else for the slightly off-topic message...)
Best Regards,
Scott

Please let me know if this has helped [hammer]
 
John,

I think I understand what you want to do - Try this :-

Do all of this previous suggestions, but also set you windowstate to 2-maximised and the alwaysontop property to true

Hope this helps

Chris
 
Thanks to all...

I have tried all above and the suggestions are elegant BUT do not get rid of the {START} button and the task bar... (and sometimes not the bars up the top either)

I presume I have to issue some windows (2000) directive to tell the {START} taskbar to hide.

When I said I wanted to take over the whole screen.. I should have said the WHOLE screen... 100%...a bit like some of those hyper professional web pages which, when loaded give a WHOLE screen appearance.

Thanks to you all for your contributions...suggestions

John Fox
 
John,
On technique to make it look like you've totally taken over, is to check the current resolution [sysmetric(1) and sysmetric(2)], and then set your window size a bit larger than this and set the top and left values negative, so your main window's edges are all off screen.

Rick
 
Try this, it worked for me:
[tt]
_SCREEN.WINDOWSTATE=0 && Normal
_SCREEN.ALWAYSONTOP=.T.
_SCREEN.CONTROLBOX=.F. && Disable form buttons
* Note that ALT+F4 will still close the app
* Add _SCREEN.CLOSABLE=.F. to disable

_SCREEN.LEFT=-4
_SCREEN.TOP=-4
_SCREEN.WIDTH=sysmetric(1)+1
_SCREEN.HEIGHT=sysmetric(2)
[/tt]
Yes, the window will actually stretch WAY off the bottom of the screen, but that shouldn't hurt anything.

Ian
 
Thanks Ian

I ran your _screen commands from within the form init code and as an independent program,,, I still cannot get rid of the START button and the task bar...

Am soooo I dumb; is it time for Hemlock

John Fox
 
The _SCREEN.AlwaysOnTop =.T. command made it overlay the taskbar & Start button for me!

You might also want to use SYSMETRIC() commands to position correctly (since the window border and title may be different sizes)
eg:
_SCREEN.Top = 0 - sysmetric(4) - sysmetric(9) - sysmetric(20)
* Window frame, window title, one line menu
_SCREEN.Left = 0 - sysmetric(3)

etc.
 
John,
If you refereing to the "Status" bar across the bottom, you can turn it off with:

SET STATUS BAR OFF

If you are refering to the toolbar across the top, you can turn it/them off with their corresponding name. (You can get the "Toolbar" names by clicking "View" in the top-line menu, and the "Toolbars". All the "Built-in" tool bar names are listed here. If there is an X in the box, then they are "Enabled". One thing you could do, is to create a routine at the start of your application to ensure that all "Open" toolbars are closed. (If you want to get real fancy, capther the ones that are open, and re-open them when you exit the application.) The tool bars are all referenced as a "WINDOW" since, that's what they are. You can detect their presence with with WEXIST(). For example, the most common toolbar used in creating VFP applications is the "Standard" tool bar. So, from you COMMAND window, enter this:

MESSAGEBOX(WEXIST("STANDARD"))

A message box will return with a .T. value if the "Standard" tool bar is present, or a .F. if it is not. So, that means, in your startup, you can control all the tool bars with something like this:

DEACTIVATE WINDOW "STANDARD"
DEACTIVATE WINDOW "FORM CONTROLS"

etc. This will "Shut down" all "Toolbars" you might be using, regardless of where they are. If you want to capture their state first, you could do this:

llStandard = WEXIST("STANDARD")
llFormControls = WEXIST("FORM CONTROLS")

If you issue a "DEACTIVE WINDOW" command on a windows that doesn't exist, no error is generated. (This is handy too.)

Then, when you "End" your program, you can put in code like:

IF llStandard
ACTIVATE WINDOW "STANDARD"
ENDIF

etc.

Lastly, make sure you bracket that code in some type of "RUN-TIME" vs. "PRODUCTION" code, as you probably don't want to go activiting toolbars on a "Shutdown" when you've got this code in production. It just makes it easier for you to return to your development environment as you left it, while testing & running the program.

Best Regards,
Scott

Please let me know if this has helped [hammer]
 
Aha !!! After the usual hours of frustration and my abject inability to rid the [Start] button and get a full screen VFP (despite all your expert advise)... I found one of the problems... In the toolbar properties (Win2000) I turned off the "Always on top" button.... Voila !! I can fill the bottom part of the screen.... COMPLETELY...

Now I turn my attention to the top... How to get rid of the VFP menu strip... stay tuned for the next gripping discovery...
 
John,
Take a look at the post I left just above your last one. I think you will find your answer there...
Best Regards,
Scott

Please let me know if this has helped [hammer]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top