B
BobRoyAce
I am designing an application, using Visual Basic in VS 2005, with a
MDI interface. It is possible for the user to have anywhere from zero
to many MDI forms open at any given time. It is also possible that
changes to data made on one form could result in the need to update
other forms that are open. An example might be that a record is added
to a table on one form, and another form has a combo box that lists
records from this table and now needs to refresh that combo box's
list. What, IMO, complicates things is that the MDI forms could be
opened in any order.
Sooooo...let's say you have the following:
Form1 (Event1A, Event1B)
Form2 (Event2A, Event2B, Event2C)
Form3
Further suppose that:
Form3 cares about Event1A and Event2A
Form1 cares about Event2B and Event2C
Form2 cares about Event1B
Perhaps there could even be "system-level events" that could occur
that certain forms would care about.
How could I implement something like this? The solution needs to take
into account that forms could be opened in any order. For example, if
Form3 is opened first, how and when will it be able to "subscribe" to
Event1A and Event2A when the corresponding forms aren't even opened
yet? Alternatively, if Form1 is loaded first, how and when will Form2
and Form3 subscribe to Form1's events?
If you could provide code samples, and/or point me to books or
websites with instructions, that would be great. Any insights and
direction would be greatly appreciated.
MDI interface. It is possible for the user to have anywhere from zero
to many MDI forms open at any given time. It is also possible that
changes to data made on one form could result in the need to update
other forms that are open. An example might be that a record is added
to a table on one form, and another form has a combo box that lists
records from this table and now needs to refresh that combo box's
list. What, IMO, complicates things is that the MDI forms could be
opened in any order.
Sooooo...let's say you have the following:
Form1 (Event1A, Event1B)
Form2 (Event2A, Event2B, Event2C)
Form3
Further suppose that:
Form3 cares about Event1A and Event2A
Form1 cares about Event2B and Event2C
Form2 cares about Event1B
Perhaps there could even be "system-level events" that could occur
that certain forms would care about.
How could I implement something like this? The solution needs to take
into account that forms could be opened in any order. For example, if
Form3 is opened first, how and when will it be able to "subscribe" to
Event1A and Event2A when the corresponding forms aren't even opened
yet? Alternatively, if Form1 is loaded first, how and when will Form2
and Form3 subscribe to Form1's events?
If you could provide code samples, and/or point me to books or
websites with instructions, that would be great. Any insights and
direction would be greatly appreciated.