SRP Form Fixer
SRP Form Fixer
Beginning with OpenInsight 7.0, changes were introduced to the Form Designer and Presentation Server that improved the way forms can be displayed. This included support for extended 3D styles, XP themes, and the correct preservation of the client size. However, forms created in older versions of OpenInsight, including earlier 32-bit releases, usually have visual anomalies until they are manually corrected or recompiled with newer Form Designers. For large applications this can be an enormous chore. The SRP Form Fixer was created to resolve this issue in seconds rather than hours.
Fixing Forms in OpenInsight 7.0.x
Proper presentation of 3D objects in forms was introduced in OpenInsight 7.0. Older versions of OpenInsight, including earlier 32-bit releases, did not support the extended 3D style that was introduced with Windows 95 and above. Therefore, controls that were supposed to have a 3D edge were drawn with an inner black border that did not conform to the look and feel of other 32-bit Windows applications. Primarily, this affected editline, editbox, and listbox controls, as seen in the following screen shot of a form designed and executed within OpenInsight v4.1.3:
New controls and forms that are developed within OpenInsight v7.0 and higher automatically benefit from the support for 3D styles. Unfortunately, due to their pre-existing style settings, forms which have been migrated from earlier versions of OpenInsight do not automatically receive these benefits. Rather, they experience two visual side-effects: 1.) The black border now appears on the outside of editbox and listbox controls, and 2.) editline controls display one pixel smaller all around. These effects can be noticed in the following screen shot of a form designed in OpenInsight v4.1.3 and executed in OpenInsight v7.0:
Unfortunately, these problems cannot be fixed by recompiling the form. Developers must manually remove each control from the form and add them back or they can programmatically fix their forms. The SRP Form Fixer corrects these problems by modifying the internal style setting of the source and object forms. Additionally, controls are automatically repositioned and resized to restore them to their pre-7.0 settings as originally intended. Forms will then appear in the Form Designer and during runtime as if they were initially created within OpenInsight 7.0:
Fixing Forms in OpenInsight 7.1.x
Prior to OpenInsight 7.1, when a form was created the absolute height and width of the form was stored in the source and object records. For many years this didn’t seem to pose any problems since most desktops used the same (or very similar) desktop themes as the developer’s machines. However, when newer themes like the XP visual styles started to become popular, a visual problem emerged.
Because OpenInsight was only storing the absolute size of a form, it was unable to adjust its size appropriately when the nonclient area was different on the end user’s machine. A typical situation would be when the developer is using the Windows Standard desktop theme and the end user is using the Windows XP theme. Note the following screen shots:
This is the identical form being displayed in two different desktop themes. As you can tell, they have the identical height (and width too). The form was created using the Windows Standard theme, which is displayed on the center. Notice how the groupbox control is carefully positioned to be balanced on all sides. However, when this same form is displayed under the Windows XP theme (the image on the right), the groupbox control looks fine on all sides except for the bottom, where it is much too close to the border. This happened because the standard caption for the Windows XP theme is a few pixels taller than it is in the Windows Standard theme. Since OpenInsight doesn’t know what the original size of the client area is, it is forced to maintain the absolute size of the window and push everything else down to make the best fit possible.
Forms created in OpenInsight 7.1.x now have their client size stored so this is no longer a problem. Additionally, pre-existing forms can be corrected by being recompiled in the Form Designer. Nevertheless, this is still a chore for large applications so the SRP Form Fixer was enhanced to fix this issue as well. (Note: Since OpenInsight does not know what the original theme was when a form was developed, it is important that this theme be active when a form is either recompiled or when the SRP Form Fixer is used. Otherwise, an incorrect client size will be saved.) Following is a screen shot of the same window displayed in the Windows XP theme after being fixed:
Another visual anomaly that was introduced with OpenInsight 7.1.x has to do with groupbox controls and screen refreshing. When new forms are created in OpenInsight 7.1.x, groupbox controls are sorted in the source and object record so that they are created last during runtime. Forms that are migrated from earlier versions of OpenInsight do not necessarily have their groupbox controls sorted in this order. These forms initially display fine (see the left image below) but when other applications are task swapped over these forms they do not refresh correctly when they are brought back to the top (see the right image below).
Like the client size problem, this can be fixed by recompiling the form in the Form Designer. However, the SRP Form Fixer also fixes this problem…and without the hassle of opening one form at a time and then recompiling.
We hope that the SRP Form Fixer will be helpful to you. If you have any questions, please contact us at email@example.com. Use and enjoy with our compliments!
This utility is offered “as is”. SRP assumes no responsibility for any changes made to forms. We recommend a complete backup of your application before using the SRP Form Fixer.