Page 1 of 1

MDI Resigning Help Needed

Posted: Mon Mar 02, 2009 3:14 pm
by Eaton
Ok, so my program has an MDI interface. I have two maps open. I have a button on my Menu Strip that is supposed to resign all open maps in the container. But it seems to resign one of the maps twice... This is my code:

Code: Select all

            var parent = (Main_Form)MdiParent;
            foreach (Form f in parent.MdiChildren)
            {
                ((Map_Form)f).map.ResignMap(map);
            }
Can someone tell me what I'm doing wrong? This has been racking my brain for hours.

Re: MDI Resigning Help Needed

Posted: Mon Mar 02, 2009 3:57 pm
by OwnZ joO
Why does your ResignMap method need a map parameter? It seems like the method should just be map.Resign() and resign the map object it's being called on.

Re: MDI Resigning Help Needed

Posted: Mon Mar 02, 2009 4:09 pm
by Eaton
You turned out to be right. It works now! :D Thank you!