On 31/05/2007 in message
>Hi all,
>
[quoted text clipped - 4 lines]
>
>how can I do this best?
What about setting up an Event in your user control and subscribing to it
in your main form?
Something like (in the user control):
public delegate void ObjectSelected(object sender, object obtosend);
public event ObjectSelected OnObjectSelected;
private void FireObjectSelected(object obtosend)
{
if (OnObjectSelected != null)
{
OnObjectSelected(this, obtosend);
}
}
When you set up your user control in the main form (or in the load event)
subscribe to the event. When your control is double clicked call
FireObjectSelected.
You may want to change the name 'ObjectSelected', I have pasted this in
from one of my apps.

Signature
Jeff Gaines
Tarscher - 31 May 2007 13:21 GMT
Thanks jeff, that worked perfectly.
Stijn
> On 31/05/2007 in message
>
[quoted text clipped - 34 lines]
> --
> Jeff Gaines