Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Stefan Wuebbe
  Where is Stefan Wuebbe?
 Hamburg
 Germany
 Stefan Wuebbe
 To: DEREK DODOO
  Where is DEREK DODOO?
 READING, UK
 United Kingdom
 DEREK DODOO
 Tags
Subject: RE: FORM NOT SIT WELL ON SQUARE SCREEN
Thread ID: 189217 Message ID: 189220 # Views: 1 # Ratings: 0
Version: Visual FoxPro 6 Category: Forms
Date: Wednesday, August 13, 2008 10:03:08 PM         
   


> Dear Expert,
>
> I'm having problems with the apperance of the form on the screen.
>
> When I display the form in a rectangular screen, everyting comes ok, however
>
> when I display the same form on a square screen part of the form on the right hand side is truncated.
>
> What settings do I need to introduce to correct this issue, so that the form can automatically adust itself to sit well irrespective of the shape of the monitor.
>
Hi Derek -

In VFP8 and VFP9 you can use BindEvent() to hook your code into _screen.Resize() (and object.Anchor is helpful in that context, too).
In Vfp6 you had to use a undocumented backdoor (which was closed later so that the following does not work in Vfp8SP1 and beyond anymore (IOW not re-tested)):

_screen.AddObject('oSH','ScreenHook')
RETURN

DEFINE CLASS ScreenHook as Custom
    oScreen = _screen
    PROCEDURE oScreen.Resize()
        && your _screen.ActiveForm.Move() code here
        && MESSAGEBOX(LOWER(PROGRAM()))
    ENDPROC
ENDDEFINE



hth
-Stefan

ENTIRE THREAD

FORM NOT SIT WELL ON SQUARE SCREEN Posted by DEREK DODOO @ 8/13/2008 9:38:22 PM
RE: FORM NOT SIT WELL ON SQUARE SCREEN Posted by Stefan Wuebbe @ 8/13/2008 10:03:08 PM
RE: FORM NOT SIT WELL ON SQUARE SCREEN Posted by Yousfi Benameur @ 8/14/2008 2:08:44 AM