Developers spend a lot of time creating forms that look just right. However, they can become distorted if the end user is permitted to resize the form. For single document applications (SDI) the developer can control this by disabling the Maximize Button and setting the Frame Style to Thin. However, for multiple document applications (MDI), the child windows have their Frame Style set back to Thick automatically by the Presentation Server.
Additionally, even with SDI applications, the developer sometimes wants to allow some ability to resize a form but with some restrictions. Typically, this is managed by trapping the SIZE event and restoring the form size programmatically. While this can work, the visual results are far less than desirable. Users see a "rubberband" effect as the event logic attempts to counteract the attempt to resize the form.
The SRP Set Min Max Info utility was designed to resolve these issues. Once installed, the developer can easily control the minimum and maximum size of any form by adding a simple command to the CREATE event:
// SRP_Set_MinMaxInfo(Window, MinSize, MaxSize, MaximizedSize)//
// Window: Fully qualified name of the window whose resize
// behavior to modify.
//
// MinSize: The minimum tracking size of the window. This parameter
// has two fields:
//
// <1> Minimum Tracking Width
// <2> Minimum Tracking Height
//
// Setting these values establishes the smallest window
// size available to the user when resizing the window.
//
// Additionally, specify "DEF" if you wish to set the
// minimum size to the window's current size or "" if you
// do not want a minimum size for your window.
//
// MaxSize: The maximum tracking size of the window. This parameter
// has two fields:
//
// <1> Maximum Tracking Width
// <2> Maximum Tracking Height
//
// Setting these values establishes the largest window size
// available to the user when resizing the window.
//
// Additionally, specify "DEF" if you wish to set the
// maximum size to the window's current size or "" if
// you do not want a maximum size for your window.
//
// MaximizedSize: The size and position of the window when maximized. This
// parameter has four fields:
//
// <1> Maximized X Position
// <2> Maximized Y Position
// <3> Maximized Width
// <4> Maximized Height
//
// Setting these values establishes the size and location
// of the window when the user clicks the maximized button
SRP_Set_MinMaxInfo(@Window, "DEF", "DEF", "DEF")
We hope that the SRP Set MinMaxInfo* will be helpful to you. If you have any questions, please contact us at help@srpcs.com. Use and enjoy with our compliments!
*This utility is offered "as is". SRP assumes no responsibility for any changes made to your application. We recommend a complete backup of your application before using the SRP Set MinMaxInfo.
| File | Date | Size |
|---|---|---|
Control the size of your OpenInsight forms easily with this free utility. It even works with MDI Child windows... | 14/03/07 3:33 pm | 3.62 MB |
