Resizing Screens


I use the RESIZER object in a number of our screens, and it works fine, but I have a problem with one client where we have MINIMUM screen of 1024 x 768 and he has a portable of 1024 x 600.  Now, Resizer can handlie it,but they cannot reach the MAXIMUM button to do it.  I am thinking of using an Fn key, but I cannot figure how to call RESIZER to do what I need.

Any ideas.
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Same effect like the Max button has following code:

ON KEY LABEL SHIFT+F5 EXECSCRIPT("IF TYPE('_screen.ActiveForm')= 'O'"+CHR(13)+"_screen.ActiveForm.WindowState=2"+CHR(13)+"ENDIF")

If you know the form name then you may simply write:

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
fmoore0001Author Commented:

My original need for this option was when folks were using screen resolutions not supported by our program, all under 1024 x 768.  Most of our screens will fit down to 800 x 600, but a number of the important ones would not.  Getting the client to understand this (can't you do this for me?) has proved pointless.  The RESIZER class in Foxpro, however, easily makes the screen fit in as low as 640 x 480!!  But, it is impossible to reach the title bar or resize (center button) for these low res screen.  Hence my need for a method to resize on command.

You put me on the right path.  I modified your code as follows:

At the start of the program, I added this code to call a Procedure:


Now, I have a number of forms that do not have the SIZER1 object on them because it is not needed, only the complex forms, but I wanted it so the ALT-F5 keypress could test for this, and work only if necessary.  This resulted in the following code which works only if ALT-F5 is pressed AND the sizer1 object is on the form:

PROCEDURE Resizeform
     LOCAL cName

     IF TYPE('_screen.ActiveForm.sizer1')= 'O'
      IF _screen.activeform.WindowState <> 2
            _screen.activeform.Windowstate = 2
           _screen.activeform.Windowstate = 0
      ?? CHR(7)
fmoore0001Author Commented:
Thank you!!
Thanks for the explanation. I am glad my idea provided some help.

Looking at your another question about the 64 bit printserver it will be not so easy to answer for FoxPro community...
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.