mdi and child

  • Thread starter Thread starter Dean L. Howen
  • Start date Start date
D

Dean L. Howen

Hi,

Under MDI form, there're some child forms should be active instead of create
new one, if they're existing

So, in which way we could determine the child form that is display.?

....

if ( frmChild is exitsing)
frmChild.Active();
else
new Child();

....

Thanks
------------------------------------------------
 
Dean,

That's dependent on your application. You should derive all of your
forms from a base form that you define, which will have an overridable
method which will determine whether or not the form that is showing is of
the type that you are looking for. Either that, or it could expose a key
for this type (and another key for the instance of that type), and you could
store those in a hash table.

Either way, you would have the form expose what "kind" it is, and then
filter based on that.

Hope this helps.
 
Back
Top