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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top