Hi!
I had similar task and I had to implement IDesignerHost,
IContainer,IServiceContainer and etc. to do this.
Form will be in design time when you add it to your DesignerHost
implementation.You should detect when the contol was dropped to the design
surface and add it to the host using CreateComponent or AddComponent.
Implementation of INameCreationService, ISelectionService is also needed.
For more details you can read this article:
http://www.divil.co.uk/net/articles/designers/hosting.asp
Regards,
InK_
[quoted text, click to view] "Lance Johnson" <ljohnson@docs.com> wrote in message
news:eB6Mipk6FHA.1248@TK2MSFTNGP14.phx.gbl...
> I have form setup to perform designing of a form. There's a toolbox that
> you can design from and everything. However, one thing I can't figure out
> how to do is manually add an item to be designed. Let's say that I want
to
> add a TextBox to this. How do I go about this? Do I need to use the
> IDesignerHost, IRootDesigner, or what do I need to do?
>
> And perhaps I'm going about this in the wrong way, but we're going to
allow
> users to layout a custom form themselves. And we'll control the basic
> elements such as the location and such. And then I want to manually add
> these to the design surface. Let me know if there's an easier way to do
> this such as serializing and deserializing. I'm sure there is, but I
can't
> exactly find the articles for doing this.
>
>
> Lance Johnson
>
>