M
Martin Hart - Memory Soft, S.L.
Hi:
I'm sure this will be a very simple question to answer, but I can't see the
solution.
I am launching a modal WinForm from my main form via:
using(frmChildForm frm = new frmChildForm())
{
frm.ShowDialog();
}
The frmChildForm class is *very* simple:
public frmChildForm()
{
Trace.WriteLine(">> C'tor frmChildForm");
InitializeComponent();
}
~frmChildForm()
{
MessageBox.Show("This is the destructor");
Trace.WriteLine(">> D'tor frmChildForm");
}
My problem is that the MessageBox (and Trace) never get
called when I close the child form. Why?
TIA,
Martin.
I'm sure this will be a very simple question to answer, but I can't see the
solution.
I am launching a modal WinForm from my main form via:
using(frmChildForm frm = new frmChildForm())
{
frm.ShowDialog();
}
The frmChildForm class is *very* simple:
public frmChildForm()
{
Trace.WriteLine(">> C'tor frmChildForm");
InitializeComponent();
}
~frmChildForm()
{
MessageBox.Show("This is the destructor");
Trace.WriteLine(">> D'tor frmChildForm");
}
My problem is that the MessageBox (and Trace) never get
called when I close the child form. Why?
TIA,
Martin.