Form Resize or Form Move?

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?
 
P

Peter Duniho

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
 
J

Joe Cool

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top