
Resizing a control when the Form is resized
About the only thing I can suggest is... since Paint always fires after
Resize, place your Resize code there.. you'll probably want to set a flag in
the Resize event that your Paint code tests and clears after use so the
control sizing doesn't take place every time Paint fires (which can be quite
often)
--
Ken Halter - MS-MVP-VB - Please keep it in the groups..
http://www.vbsight.com/ - http://www.vbsight.com/MultiColumn.htm
Quote:
> Hi all...
> I have some controls on a form. Inside the form I have a container
> control called spMain, and inside that container control, I have
> other controls.
> spMain is resized correctly when the Form is resized, due to how that
> control was programmed internally, but, that spMain control contains
> other controls, for example, a Frame control, which I need to resize
> manually proportionally to spMain dimensions.
> I tried to use Form_Resize method, but apparently, that event is
> called prior efectively resizing of the form, so the spMain control
> doesn't have the new size yet and when I calculate the new size of
> the Frame control, I'm using the old spMain size instead of the new
> one.
> How can I do it?
> Thanks
> Jaime