I think I've found a way to do it:
In the main form, there is a lblStatus.
In the user controls, which the main form knows about, there is also a
m_lblStatus control but this control doesn't get created locally.
After the main form creates lblStatus (which happens after the user controls
are created), a reference to lblStatus is written to the user control's own
m_lblStatus. Thereafter, when the user controls need to write status data to
the main form, they just write it directly to their own m_lblStatus member
which is, in reality, the main form's label which displays status.
Since I come out of a C++ background rather than a VB, I don't actually like
doing things this way. I'd originally wanted to be OOP about things but
could not come up with either a message dispatching system or a delegate
that would do the trick for me. Can someone think of a better technique to
get the status string from a user control up to the main form?
--
Richard Lewis Haggard
www.Haggard-And-Associates.com
"Richard Lewis Haggard" <HaggardAtWorldDotStdDotCom> wrote in message
news:ul**************@TK2MSFTNGP05.phx.gbl...
I have a form that has a label. This form also has a tab control. The tab
control has a user control pasted on its page. Under some conditions, the
user control needs to send status strings back to the main form for
display. How can this be done?
--
Richard Lewis Haggard
www.Haggard-And-Associates.com