IPC between two mdi Children.

  • Thread starter Thread starter JB
  • Start date Start date
J

JB

All,
Quick question here, Is it possible to exchange information between two mdi
Children? The situation is this:
I have one window which is a mdi child, and spawns another mdi child,
which is used to browse and select a record from a datagrid, and exit.
Obviously Show Dialog is the easy answer, and treat the select window as
modal. The issue is that I want to maintain the MDI situation. This
selection should not be a modal situation.

Any ideas and suggestions?

Jamison
 
Jamison,

When creating the new form, pass the reference to the form that created
it through the constructor, a method call, or a property, and then the child
form can reference the parent. You wouldn't need to use ShowDialog in this
case.

Hope this helps.
 
Just to make sure I am following,

public ListAccounts(){};

would become :
public ListAccounts( object parent){...}

or would it be:
public ListAccounts( ParentFormClass parent){...}

Thanks in Advance,
Jamison

Nicholas Paldino said:
Jamison,

When creating the new form, pass the reference to the form that created
it through the constructor, a method call, or a property, and then the
child form can reference the parent. You wouldn't need to use ShowDialog
in this case.

Hope this helps.


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)


JB said:
All,
Quick question here, Is it possible to exchange information between two
mdi Children? The situation is this:
I have one window which is a mdi child, and spawns another mdi child,
which is used to browse and select a record from a datagrid, and exit.
Obviously Show Dialog is the easy answer, and treat the select window as
modal. The issue is that I want to maintain the MDI situation. This
selection should not be a modal situation.

Any ideas and suggestions?

Jamison
 
Back
Top