Explorar el Código

2006-02-03 Peter Dennis Bartok <[email protected]>

	* Control.cs (RecreateHandle): No need to re-create any child
	  controls, the child windows will get destroyed automatically by
	  the windowing system or driver, and re-created when the handle
	  is being accessed the first time. Fixes #77456
	* Form.cs: No longer setting the form to closing if the handle is 
	  being recreated. This seems like the right thing to do, don't
	  have a bug or testcase for this, though.


svn path=/trunk/mcs/; revision=56510
Peter Dennis Bartok hace 20 años
padre
commit
db4017ba60

+ 10 - 0
mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog

@@ -1,3 +1,13 @@
+2006-02-03  Peter Dennis Bartok  <[email protected]>
+
+	* Control.cs (RecreateHandle): No need to re-create any child
+	  controls, the child windows will get destroyed automatically by
+	  the windowing system or driver, and re-created when the handle
+	  is being accessed the first time. Fixes #77456
+	* Form.cs: No longer setting the form to closing if the handle is 
+	  being recreated. This seems like the right thing to do, don't
+	  have a bug or testcase for this, though.
+
 2006-02-02  Peter Dennis Bartok  <[email protected]>
 
 	* FileDialog.cs: Suspend/Resume layouting when changing sizes of

+ 0 - 6
mcs/class/Managed.Windows.Forms/System.Windows.Forms/Control.cs

@@ -3253,12 +3253,6 @@ namespace System.Windows.Forms
 			if (IsHandleCreated) {
 				DestroyHandle();
 				CreateHandle();
-
-				// FIXME ZOrder?
-
-				while (child.MoveNext()) {
-					((Control)child.Current).RecreateHandle();
-				}
 			} else {
 				if (!is_created) {
 					CreateControl();

+ 3 - 1
mcs/class/Managed.Windows.Forms/System.Windows.Forms/Form.cs

@@ -1541,7 +1541,9 @@ namespace System.Windows.Forms {
 			switch((Msg)m.Msg) {
 				case Msg.WM_DESTROY: {
 					base.WndProc(ref m);
-					this.closing = true;
+					if (!is_recreating) {
+						this.closing = true;
+					}
 					return;
 				}