Resizing Screens

Folks,

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.
fmoore0001Asked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
pcelbaConnect With a Mentor Commented:
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:
ZOOM WINDOW FormName MAX
0
 
fmoore0001Author Commented:
Pcelba

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:

ON KEY LABEL ALT+F5 DO ResizeForm

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
      ELSE
           _screen.activeform.Windowstate = 0
      ENDIF
                     _screen.activeform.Refresh()
     ELSE
      ?? CHR(7)
     ENDIF
ENDPROC
0
 
fmoore0001Author Commented:
Thank you!!
0
 
pcelbaCommented:
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...
0
All Courses

From novice to tech pro — start learning today.