- Don't always reset the border styles or forms will be messed up.
authorPeter Dennis Bartok <pbartok@mono-cvs.ximian.com>
Sat, 29 Jul 2006 22:36:39 +0000 (22:36 -0000)
committerPeter Dennis Bartok <pbartok@mono-cvs.ximian.com>
Sat, 29 Jul 2006 22:36:39 +0000 (22:36 -0000)
svn path=/trunk/mcs/; revision=63149

mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUIWin32.cs

index 6be452d5ce7cf413efe90e2db5e19224a08cfe26..ccc32ee93629438acd928fd6a238477d6c2a00e3 100644 (file)
@@ -1991,20 +1991,22 @@ namespace System.Windows.Forms {
                        style = Win32GetWindowLong(handle, WindowLong.GWL_STYLE);
                        exstyle = Win32GetWindowLong(handle, WindowLong.GWL_EXSTYLE);
 
-                       style &= ~(uint)WindowStyles.WS_BORDER;
-                       exstyle &= ~(uint)WindowExStyles.WS_EX_CLIENTEDGE;
 
                        switch (border_style) {
                                case FormBorderStyle.None: {
+                                       style &= ~(uint)WindowStyles.WS_BORDER;
+                                       exstyle &= ~(uint)WindowExStyles.WS_EX_CLIENTEDGE;
                                        break;
                                }
 
                                case FormBorderStyle.FixedSingle: {
                                        style |= (uint)WindowStyles.WS_BORDER;
+                                       exstyle &= ~(uint)WindowExStyles.WS_EX_CLIENTEDGE;
                                        break;
                                }
 
                                case FormBorderStyle.Fixed3D: {
+                                       style &= ~(uint)WindowStyles.WS_BORDER;
                                        exstyle |= (uint)WindowExStyles.WS_EX_CLIENTEDGE;
                                        break;
                                }