On 25/02/2005 8:49 PM, in article uXb1Gu3GFHA.2736@TK2MSFTNGP09.phx.gbl,
Hi Robin,
> Currently when a OnDragDrop event fires in my control designer I use
> ISelectionService to get the component that was dropped. I know there has
[quoted text clipped - 3 lines]
> returns true and DragEventArgs.Data.GetData(".NET Toolbox Item") returns a
> MemoryStream. IToolBoxService.IsToolBoxItem reports False.
The object that is being dropped is the toolbox item rather than the new
component (see IToolboxService.DeserializeToolboxItem and
IToolboxItem.CreateComponents). The MSDN Shape Designer sample illustrates
what happens ( http://windowsforms.net/articles/shapedesigner.aspx - see the
discussion around the OnDragDrop handler in the article).
I'm not sure what it is you're trying to do but maybe the events on
IComponentChangeService (ComponentAdded, ComponentAdding etc.) might be an
easier way of achieving it.
Cheers,
Simon