A great feature provided by ActiveResize control is its ability to exclude any control on the form from being resized and / or repositioned when the form is resized, using the powerful Exclude commands. These commands give you full control over which properties of the specific control should be excluded during the resize / reposition process. These properties include the Left, Top, Height, Width, Font, or All, as well as the X1, Y1, X2, Y2 for Line (shape) controls.
ActiveResize also provides a special command for grid controls, the Ex_Columns, which tells ActiveResize not to resize the columns of a grid, so that when the grid gets wider as the form is resized, it will display more columns rather than displaying wider columns. This command should be used in conjunction with the Ex_Font command so that the grid font size remains unsized when the grid is resized.
The Exclude Commands can be implemented by using the Tag property of the specific control(s) that you want to exclude from being resized and / or repositioned.
By using any of the following Exclude Commands in the Tag property of any control, ActiveResize will exclude the corresponding property of the specific control from being processed when the form is resized. The Exclude Commands can be used at both design-time and at run-time.
Command | Description |
Ex_Left | Excludes the Left property of the control from being changed |
Ex_Top | Excludes the Top property of the control from being changed |
Ex_Height | Excludes the Height property of the control from being changed |
Ex_Width | Excludes the Width property of the control from being changed |
Ex_X1 | Excludes the X1 property of the control from being changed (for Line controls only) |
Ex_Y1 | Excludes the Y1 property of the control from being changed (for Line controls only) |
Ex_X2 | Excludes the X2 property of the control from being changed (for Line controls only) |
Ex_Y2 | Excludes the Y2 property of the control from being changed (for Line controls only) |
Ex_Font | Excludes the Font property of the control from being changed |
Ex_Columns | Excludes the width property of all grid columns from being changed |
Ex_All | Excludes all the above properties of the control from being changed |
Remarks
The Exclude Commands can be used in any desired combinations (comma-separated), as shown below:
'Excluding the control from being repositioned
Control.Tag = Ex_Left, Ex_Top
'Excluding the control from being resized, including its font size
Control.Tag = Ex_Height, Ex_Width, Ex_Font
The use of Exclude Commands to keep certain controls from being resized / repositioned might be useful in certain cases such as when a control has to stay in a specific position on the form (e.g. At the corners or the center of the form) or when the control size should not be changed. It is also useful for such controls as the VScrollBar and HScrollBar where the Width or Height property might be kept fixed to achieve a more uniform appearance. However, you have to be careful when using the Exclude Commands to exclude controls from being resized / repositioned because once the form is resized, all controls will be resized and repositioned (by default) except the specified control(s). This may result in overlapping among controls, i.e. some controls may be positioned over or covered by other controls.
Copyright 2002-2018 - VBGold Software