I've been working on this for a while and now it's nearly ready to hand out to people. I have a few questions I'd like some collaboration help from, first.
- Resizing events in subforms can be handled from the subform's class module with no help from the main form... except when maximizing the main form. In that case, the subform does not receive a resize event so the controls in it stay the same size/position as they were before the maximize. Does anyone have any suggestions/ideas/comments on this? I was hoping to avoid the need to make the main form's resize module aware of subforms.
- Resizing properly for a form that has page header/footer or form header/footer can be a pain. How many people have forms with these elements that you would like to resize? I can make my code work with these elements, but I haven't done it yet. Do you want this?
- I'd like to assess the demand for multiple resizable areas of a form, that is, splitter bars that can change the width/height of sub-areas, requiring special resizing. Is this something you need? Is there a control out there that handles this already?
- What kind of resizing do you want for listboxes? My module as it is can proportionally resize the columns in a listbox. Would you want to specify some columns as fixed-width and others as resizable? (Note: this is not resizing individual columns by a mouse movement but simply making the columns fit proportionally into the listbox as it is sized with the whole form in a resize event.)
- Speaking of listboxes, do you have interest in code to handle resizing of specific columns, sorting by different columns, and detecting a click on a specific column in the header? Is there an explorer-style listbox control out there that you can suggest which does all these things for me so I don't have to write all this stuff for Access 97? (That is, resizing columns, dragging columns to change order, auto-resize to a column's visible values or full list with a double-click on divider, adding/removing columns with a right-click or other means, etc.)
Once I am satisfied with my class module I'll be happy to share it with everyone. You would not believe how much work it was to find out the correct constants and math to determine the current Windows size settings on form borders and elements.
Usage info:
- One form-class-module global object to point to the resize control.
- Instantiate the class with custom "border" space or let the control choose the space based on the position of your topmost and leftmost controls.
- ResizeToMinimum feature: No more laborious painstaking adjusting your forms to get them just the right size. Resize the form in Design Mode all you want and let the resize control do the job at form load.
- Resizing is now as easy as [tt]MyResizingClass.Resize[/tt],voilá!
- Easy to add new controls. Just place a value in the Tag of a control telling the class how to resize the control. Add one or more values below to get the behavior you want:
1 - move left
2 - move top
4 - resize width
8 - resize height
16 - resize listbox columnwidths
For example, for a button in the lower right corner, the value 3 (1+2) will make it stay in the lower right corner.
Note: some combinations don't make sense.
The values 1, 2, 4, 8 for each behavior are arbitrary... suggestions are welcome. The Tag is the only place I know to easily store a value for each control—if you are already using the tag you'll need to make modifications to your code and mine to allow for both to be stored in the tag. Again, suggestions are welcome.
-E²
- Resizing events in subforms can be handled from the subform's class module with no help from the main form... except when maximizing the main form. In that case, the subform does not receive a resize event so the controls in it stay the same size/position as they were before the maximize. Does anyone have any suggestions/ideas/comments on this? I was hoping to avoid the need to make the main form's resize module aware of subforms.
- Resizing properly for a form that has page header/footer or form header/footer can be a pain. How many people have forms with these elements that you would like to resize? I can make my code work with these elements, but I haven't done it yet. Do you want this?
- I'd like to assess the demand for multiple resizable areas of a form, that is, splitter bars that can change the width/height of sub-areas, requiring special resizing. Is this something you need? Is there a control out there that handles this already?
- What kind of resizing do you want for listboxes? My module as it is can proportionally resize the columns in a listbox. Would you want to specify some columns as fixed-width and others as resizable? (Note: this is not resizing individual columns by a mouse movement but simply making the columns fit proportionally into the listbox as it is sized with the whole form in a resize event.)
- Speaking of listboxes, do you have interest in code to handle resizing of specific columns, sorting by different columns, and detecting a click on a specific column in the header? Is there an explorer-style listbox control out there that you can suggest which does all these things for me so I don't have to write all this stuff for Access 97? (That is, resizing columns, dragging columns to change order, auto-resize to a column's visible values or full list with a double-click on divider, adding/removing columns with a right-click or other means, etc.)
Once I am satisfied with my class module I'll be happy to share it with everyone. You would not believe how much work it was to find out the correct constants and math to determine the current Windows size settings on form borders and elements.
Usage info:
- One form-class-module global object to point to the resize control.
- Instantiate the class with custom "border" space or let the control choose the space based on the position of your topmost and leftmost controls.
- ResizeToMinimum feature: No more laborious painstaking adjusting your forms to get them just the right size. Resize the form in Design Mode all you want and let the resize control do the job at form load.
- Resizing is now as easy as [tt]MyResizingClass.Resize[/tt],voilá!
- Easy to add new controls. Just place a value in the Tag of a control telling the class how to resize the control. Add one or more values below to get the behavior you want:
1 - move left
2 - move top
4 - resize width
8 - resize height
16 - resize listbox columnwidths
For example, for a button in the lower right corner, the value 3 (1+2) will make it stay in the lower right corner.
Note: some combinations don't make sense.
The values 1, 2, 4, 8 for each behavior are arbitrary... suggestions are welcome. The Tag is the only place I know to easily store a value for each control—if you are already using the tag you'll need to make modifications to your code and mine to allow for both to be stored in the tag. Again, suggestions are welcome.
-E²