Many Vista related application issues are resolved by Visual DataFlex 2008. One of the most important 2008 enhancements is the introduction of "Client Area Sizing". To gain the benefits of Client Area Sizing and provide the best overall end-user experience on Windows Vista, developers are strongly encouraged to upgrade to this latest version of Visual DataFlex.
Background: How Different Windows Platforms Impact View/Dialog Sizing
In all revisions of Visual DataFlex prior to 2008, the defined size of views and dialogs referred to the entire bounding rectangle of the window. Since the outer boundary set the size, applications migrated from Windows 2000 to Windows XP may have experienced negative effects on the client area of views and dialogs when XP increased the non-client area size. To illustrate, heres a typical Visual DataFlex view, with the window and client area regions marked:
When the size of the non-client area changes, it leaves less room for the client area, which often results in controls being clipped at the bottom, like this:

The default theme in Windows Vista increases the size of the non-client area even more than XP, thereby also clipping controls on the right. So an application with outer boundary definition could look something like this:

Client Area Sizing to the Rescue!
Taking Advantage of Client Area Sizing
All new views and dialogs created in Visual DataFlex 2008 use Client Area Sizing by default. This ensures that new views and dialogs always display correctly on all platforms.
Existing views and dialogs are automatically converted to use Client Area Sizing as part of migrating your workspace to Visual DataFlex 2008. When you migrate an existing workspace to Visual DataFlex 2008 by running the migration wizard (which automatically occurs when you open a specific workspace for the first time in the latest version of Visual DataFlex), all the views and dialogs in all the projects within that workspace are automatically adjusted for Client Area Sizing by default. Client Area Sizing can also be disabled during migration.
To manually adjust a view or dialog after migration, follow two simple steps:
-
Ensure that Client Area Sizing is enabled by verifying that the pbSizeToClientArea property in the view/dialog is set to True (this should already be the case, as its set to True by default in the superclass).
-
Simply adjust the size of the view/dialog in the Visual Designer to an appropriate size. When done, the view/dialog will display correctly on all platforms.
Client Area Sizing is so powerful and so useful that changing the setting of this property to false will be very unusual. With Client Area Sizing, developers can even design views and dialogs on Windows XP and then deploy them on Windows Vista with the assurance that they will display correctly.
Client Area Sizing and Anchors
The use of anchors can sometimes disguise problems with clipping and cause controls in a view to relocate and overlap each other. Even though it may not be apparent, the incorrect display of controls is caused by the smaller client area causing them to relocate. This condition is fixed by using Client Area Sizing.
Client Area Sizing and piMinSize/piMaxSize
Client Area Sizing changes the metrics for all size properties, including Size, GuiSize, piMinSize and piMaxSize. This makes all size related properties consistent. When Client Area Sizing is turned off, they all refer to the window bounding rectangle, and when Client Area Sizing it turned on, they all refer to the client area size.
If Size is set smaller than piMinSize, or larger than piMaxSize, strange results may occur. This is not really related to Client Area Sizing but the problem may expose itself when enabling Client Area Sizing.
When existing views and dialogs are converted for Client Area Sizing as part of migrating to Visual DataFlex 2008, piMinSize and piMaxSize are also adjusted automatically. Problems should not occur while migrating existing views and dialogs, but it is important to understand the relationship between Size, piMinSize and piMaxSize.
Client Area Sizing and Subclasses
When migrating existing workspaces to Visual DataFlex 2008, views and dialogs can automatically be converted to use Client Area Sizing. The Visual DataFlex 2008 migration wizard will automatically recognize your view and dialog subclasses during this process so that views and dialogs based on those subclasses are also converted.
In some cases however, if applications have special logic in the subclasses dealing with view and dialog sizing, that logic may have to be revised to work correctly with Client Area Sizing. The need to revise logic should be very rare as most views and dialogs specify the size within the object and not in the class. But if there is special logic in subclasses, it should be easy to revise after migration and we still recommend migrating to Client Area Sizing first and then revising the special logic in the subclasses afterwards.
Visual DataFlex 2008 introduces Client Area Sizing which means that views and dialogs are sized according to the available client area within a window, instead of sizing according to the outermost window bounding rectangle. The outer bounding rectangle is now adjusted automatically to the correct size for the platform on which the application is deployed. The result of using Client Area Sizing in Visual DataFlex 2008 is that all views and dialogs in applications will display correctly on all platforms:

Client Area Sizing is a superior sizing mechanism. Views and dialogs can be designed on any platform (Vista, XP, Windows 2000) and then deployed with the assurance that they will look great everywhere. For this reason, Client Area Sizing is the default for all views and dialogs in Visual DataFlex 2008. Since Client Area Sizing is the new default, the size of existing views and dialogs based on the window bounding rectangle will need to be adjusted. The adjustment can be made either by disabling Client Area Sizing or by changing the size of the view/dialog. Changing the view/dialogue size is the recommended approach. The Visual DataFlex 2008 workspace migration wizard will perform either of these adjustments automatically. The overall result of upgrading and migrating to Visual DataFlex 2008 Client Area Sizing is that applications become Vista ready and automatically able to adjust to display properly on any Windows platform.