Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Centering Forms
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
Miscellaneous
Thread ID:
00724995
Message ID:
00724998
Views:
42
Here's the sample code that will center forms when size of the main VFP Window changes.
_Screen.AddObject("oResizer", "Resizer")
DEFINE CLASS Resizer AS Custom
  oScreen = _Screen
  PROCEDURE oScreen.Resize
    IF _screen.WindowState <> 1  && Main VFP Window isn't minimized
      FOR i=1 TO _screen.FormCount
         IF _screen.Forms(i).AutoCenter
            _screen.Forms(i).AutoCenter = .F.        
            _screen.Forms(i).AutoCenter = .T.        
         ENDIF
      ENDFOR 
    ENDIF
  ENDPROC
ENDDEFINE
>Hi to all,
>
>When the main VFP window is maximized, the inside form remains in place where it was earlier centered.
>
>How can I ensure autometic centering of the current form when the user maximizes the VFP main window to full screen?
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform