List Info

Thread: Need help to understand WinForms code




Need help to understand WinForms code
country flaguser name
Argentina
2007-10-03 11:31:12
Hi,

I'm working on bug #328019

The problem seems to be that MdiParent is changed during MDI
children's 
load event (although it'is set to the same parent again,
MdiParent.set 
does it's thing anyway). .NET allows a MdiParent change
during the load 
event of a children even to a different parent.

The simplified problem is:

MdiParent.set {
    ...
    if(value != null) {
       ...
        if (IsHandleCreated)
            RecreateHandle ();
    }
}

Now RecreateHandle() will cause a chain reaction of handle
destruction 
(and recreation). The question is, why must the handle be
recreated (via 
DestroyHandle by the way) when changing parents?

Of course, the test app for this bug will pass if you
comment 
RecreateHandle ();

Regards,
Ernesto

_______________________________________________
Mono-winforms-list maillist  -  Mono-winforms-listlists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-winform
s-list

[1]

about | contact  Other archives ( Real Estate discussion Medical topics )