Form Resize or Form Move?

  • Thread starter Thread starter Joe Cool
  • Start date Start date
J

Joe Cool

The Form.Move event is raised when a form is resized.

The Form.ResizeEnd event is raised when a form is moved.

Just how the hell can I tell when a form is merely moved or resized?
 
The Form.Move event is raised when a form is resized.

The Form.ResizeEnd event is raised when a form is moved.

Just how the hell can I tell when a form is merely moved or resized?

It's not that hard. Just compare the previous known position and size
with the new one.

That's assuming the events are really doing what you say they are. I've
used them myself and never noticed the discrepancy; it's possible I simply
overlooked it, but you should double-check to make sure your observations
are accurate.

Pete
 
It's not that hard.  Just compare the previous known position and size  
with the new one.

I thought of that but was hoping for a more "elegant" solution.

All I needed to do was remember the current size of the form. If that
had not changed, then I know the form didn't actuall get resized, just
moved, in the ResizeEnd event handler. Don't really need any code in
the Move event handler.
 
Back
Top