I am trying to create a service that will hook to the events fired by the
IComponentChangeService. I will use this new service to automatically
position controls based on their size and location, the controls have to
stay for example within an area of 300, 300. So if anyone created a control
outside this area the control will automatically be moved to the new
location within the 300, 300 area.

When you listen to the event ComponentChanged of the IComponentChangeService
you get the components name, the property that changed, the new and the old
value of the property. Thus when a user changes the location of a component
or the size and its bounds are outside the 300, 300 area I can successfully
roll back to the old property value.

But now for new components you can hook to the ComponentAdded event but
there is one big problem. When this event is fired the component does NOT
have the location property set yet. Therefore I am wondering where or when
is the Location property actually set? And why doesn't the ComponentChanged
event get fired when the location property is set afterwards because that
would have also fixed my problem.

Gabriel Lozano-Morán
Real Software