Tim Haughton wrote:
The subform should then be a field in the parent form. The paremt form
should only create a new subform when there isn't already one in existence.
Well, I'm probably doing it totally wrong, but here's what I ended up doing.
When I launch, I create a member refernce in the parent (this is not MDI):
if(Child==null)
frmChild Child = new frmChild(frmParent);
So, at that point frmParent.Child holds the reference to the child, and
I pass in a reference to the parent in the constructor.
Then in the child Dispose() method I put
frmParent.Child=null;
So, if the child form is open, it will not launch a new form...it will
only activate and bring the existing one to the foreground.