Help: SubForm close when exist from Sub-Sub-Form

Help: SubForm close when exist from Sub-Sub-Form

wesbird
Collaborator Collaborator
276 Views
0 Replies
Message 1 of 1

Help: SubForm close when exist from Sub-Sub-Form

wesbird
Collaborator
Collaborator
Hi,

I'm working on adding a sub-sub-form to a application I built a couple years ago. It should be simple, I have Main Form A, click a button, a sub form B pop up. Now I add a button(e.g. Pop) in form B, click it, sub - sub - form C pop up. so far so good. now when I click the exit in form C, form C close fine, but form B close as well.

here is the code I show and close form c(frmO)
this is code in button Pop of form B
...
Forms.frmOrg frmO = new Forms.frmOrg();
Autodesk.AutoCAD.ApplicationServices.Application.ShowModalDialog(null, frmO, true);
...

this is code in Exit button in form C
private void cmdExit_Click(object sender, System.EventArgs e)
{
this.Hide();
this.Close();
}

this is code in Exit in Form B
// button Exit
private void cmdExit_Click(object sender, System.EventArgs e)
{
_dtSearchReturn.Clear();

this.Hide();
frmO.Dispose();
}

What kind of problem it could be? Thank you very much for you time.



Wes














AutoCAD 2006, .Net 1.1 Windows 2003 Server
Windows 10 64 bit, AutoCAD (ACA, Map) 2023
0 Likes
277 Views
0 Replies
Replies (0)