Click to See Complete Forum and Search --> : How to capture the end of MDIForm_Resize Event


yuren
June 18th, 2001, 01:41 PM
Hi, all,

I have a question here, may be simple to you guys, but cost me a lot of time to figure it out.

What I want to do is that I want to capture the very end of the Form_Resize event.

Say, I want to resize the controls on my form, but what I want to do is not to keep triggering the resize event as I drag the right-bottom corner, but just want to resize every control on my form at the very end when the mouse is up. But in the process of dragging, the controls on the form will keep the same size. This may be weird, but what I want to do is to redraw a map, so it is really slow if I keep redrawing it.

How can I capture this event.

Thanks a lot.

Yuren

love programming!

phunkydude
June 18th, 2001, 01:54 PM
Don't think this is going to answer your question...
Why not include zoom functionality, which allows the user to zoom in or out on the map.
This way you leave the Form_Resize out of the picture ;) altogether.
Lemme know what you decide.

Alejandro Ochoa
June 18th, 2001, 02:02 PM
Why don't you try this.

1- In the mouse down event, capture in variables the height and the width of the form that is going to be resized.

2- In the mouse up event, find out if the form's height and width have been changed, if so, resize the controls, using the same code as in the resize event.

Let me know if this helped you.

Alejandro.

yuren
June 18th, 2001, 02:15 PM
Hi,

The mouse down event can only be captured when the mouse is inside the form, but to my situation, I have to capture the event when the mouse is on the border of the form, is there any way to capture this.

Thank you.
Yuren

love programming!