P
Paul
Hi,
I have a class module for automatically resizing controls on a form. The
class is called clsFormResize
The class module has a declaration: 'Private WithEvents frm as Form' and has
some code on frm_Resize which them modifies the positions/sizes of the
controls.
I set a module level variable to the class in a form that needs to use the
resize functionality, and I set a few details in the load event of the form.
The resize event correctly sinks (terminology?) to the class *only* if the
form itself has a Private Sub Form_Resize() block of code (even if there is
no actually code, just the sub, end sub pair).
This is not a huge problem, it is just annoying that the Form_Resize code
must be present in the form as i) you have to add that piece of code and ii)
you have to remember never to delete it out, even though there is not code
there to execute.
Is this normal behaviour? Is there a way around the problem?
Thanks
Paul
I have a class module for automatically resizing controls on a form. The
class is called clsFormResize
The class module has a declaration: 'Private WithEvents frm as Form' and has
some code on frm_Resize which them modifies the positions/sizes of the
controls.
I set a module level variable to the class in a form that needs to use the
resize functionality, and I set a few details in the load event of the form.
The resize event correctly sinks (terminology?) to the class *only* if the
form itself has a Private Sub Form_Resize() block of code (even if there is
no actually code, just the sub, end sub pair).
This is not a huge problem, it is just annoying that the Form_Resize code
must be present in the form as i) you have to add that piece of code and ii)
you have to remember never to delete it out, even though there is not code
there to execute.
Is this normal behaviour? Is there a way around the problem?
Thanks
Paul