No, I actually wasn't. I don't think CanParent has anything to do with what
information I needed. The Loading property does the trick though.
"Joey Callisay" <hcalisay@codex-systems.com> wrote in message
news:eUTrQt$rEHA.2764@TK2MSFTNGP11.phx.gbl...
> I can sense that you are creating a custom container control, aren't you?
> If you are, then there is a CanParent method to validate the controls
added
> to your container control...
>
> here is another good link on designers:
>
http://www.divil.co.uk/net/articles/designers/collectioncontrols.asp
>
> "Marina" <someone@nospam.com> wrote in message
> news:uYxILs8rEHA.2596@TK2MSFTNGP12.phx.gbl...
> > Found that if I get the IDesignerHost service, I could check its Loading
> > property to see if the designer was loading. If it is not, then I know
> the
> > control was just added. If it is, then I know the designer is just
> loading,
> > so no need to do anything.
> >
> > "Marina" <someone@nospam.com> wrote in message
> > news:%231usgX8rEHA.1272@TK2MSFTNGP09.phx.gbl...
> > > Hi,
> > >
> > > I need an event that fires ONLY when the user has JUST dragged a
> component
> > > on.
> > > I tried creating my own ComponentDesigner class to deal with some
> events.
> > >
> > > I tried handling the ComponentAdded event. ComponentAdded fires
> whenever
> > > the project is loaded and the form designer is loaded.
> > >
> > > The ComponentAdding event does not run unless at least 1 of the object
> is
> > > already on the form. And it always runs for all the previous
instances
> of
> > > the object - not for the current one (Initialize method is called
after
> > > ComponentAdding is called).
> > >
> > > Basically, if the object just got added to the form (i.e. user just
> > dragged
> > > it on), I want to create another object to go along with it.
> > >
> > > Alternatively, I could deal with checking if a particular property is
> set
> > to
> > > perform this action. Problem is, that ComponentAdded is run before the
> > > property sets from the previous design session are run - so the
property
> > is
> > > never set at the time this event runs.
> > >
> > > Any solutions?
> > >
> > >
> >
> >
>
>