KeepSize property


Available for Window objects.

Read/Write at design time

Specifies whether a Window object and all of its children keeps their original size in different screen resolutions and/or screen font sizes (large or small). It can be one of the following values:

TRUE    Window and its children keep their original size.
FALSE  Window and its children change their size according to screen fonts and/or resolution.

Some applications (i.e. the EC Player project included with Easy Code) need to keep always the same size (its original size) at any screen resolution. This may be accomplished by setting this property to TRUE and taking into account the following considerations:

- ScaleMode property has to be set to pixels (twips will not work).
- All Picture objects inside the Window (if any), should also have its ScaleMode property set to pixels.
- The Window object and all of its children should have a true type font, i.e. Arial (MS Sans Serif will not work), to keep the font size unchanged.

When keeping its size, only the caption of the Window object vary for small or large fonts. So, if it has a caption (title bar), you have to take it into account (in the WM_CREATE message) in order to adjust its client area.


REMARKS: The original size of the object means its size at design time, which is saved when building the project. According to that, you have to design it and build it with the same screen font size and resolution. This property may be useful, for example, when skinning a window.