It sounds like you could use an events tutorial:
http://msdn.microsoft.com/library/de...tstutorial.asp
It seems that frmDevice should contain an event. The delegate for this event
will look something like this...
public delegate void MyDeviceEventHandler( frmDevice sender, DeviceEventArgs
e );
When frmMain creates a frmDevice, it attaches a handler to the frmDevice's
event. You only need to have the sender in the signature of the delegate if
you care where the event comes from.
Regards,
Tim Haughton
"db_from_mn" <db******@discussions.microsoft.com> wrote in message
news:B7**********************************@microsof t.com...
I have multiple instances of frmDevice forms that were created by a single
frmMain. I'd like alert frmMain of certain frmDevice events.
What is the best way of doing this?
Should I create an event delegate? If so, then it seems that I would need
to pass a reference to frmMain to each frmDevice, so that I can attach a
frmMain handler.
I'm somewhat new at this, so would appreciate the help,
Thanks in advance,
Dennis