We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Window is always resizable, minimizable and closeable on windows
**Describe the bug**
Window seems to ignore `resizable`, `minimizable` and `closeable` args on OS Windows: if they're set to `False`, window still can be resized, minimized and closed.

**To Reproduce**
Steps to reproduce the behavior:
1. Pass `minimizable=False`, `resizable=False` and `closeable=False` to `Window.__init__`.
2. Resize it, minimize it, close it.

**Expected behavior**
Window should keep its size, and all of titlebar buttons should be hidden (minimize and close due to corresponding args, and fullscreen due to resizable).

**Simple example**
```python
import toga


class App(toga.App):
    def open_window(self, widget: toga.Widget):
        # resizable, minimizable and closeable are False
        window = toga.Window(
            "window id", "window title", size=(320, 240), resizeable=False, minimizable=False, closeable=False
        )
        window.content = toga.Box()
        self.windows += window
        window.show()

    def startup(self):
        # resizable and minimizable are False
        self.main_window = toga.MainWindow(
            title=self.formal_name, factory=self.factory, resizeable=False, minimizable=False
        )

        box = toga.Box()
        btn = toga.Button("Open second window", on_press=self.open_window)
        box.add(btn)
        self.main_window.content = box

        self.main_window.show()


def main():
    App("testing", "testing").main_loop()


if __name__ == "__main__":
    main()

```

**Screenshots**
![resizing](https://user-images.githubusercontent.com/2825638/152692206-4b1f3a1b-0945-4895-a71b-31c379e26fe6.gif)


**Environment:**
 - Operating System: Windows 10
 - Python version: 3.10.1
 - Software versions:
   - Toga: 0.3.0.dev30

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `src/winforms/toga_winforms/window.py`
Content:
```
1 from toga import GROUP_BREAK, SECTION_BREAK
2 
3 from .libs import Point, Size, WinForms
4 
5 
6 class WinFormsViewport:
7     def __init__(self, native, frame):
8         self.native = native
9         self.frame = frame
10         self.baseline_dpi = 96
11 
12     @property
13     def width(self):
14         # Treat `native=None` as a 0x0 viewport
15         if self.native is None:
16             return 0
17         return self.native.ClientSize.Width
18 
19     @property
20     def height(self):
21         if self.native is None:
22             return 0
23         # Subtract any vertical shift of the frame. This is to allow
24         # for toolbars, or any other viewport-level decoration.
25         return self.native.ClientSize.Height - self.frame.vertical_shift
26 
27     @property
28     def dpi(self):
29         if self.native is None:
30             return self.baseline_dpi
31         return self.native.CreateGraphics().DpiX
32 
33 
34 class Window:
35     def __init__(self, interface, title, position, size):
36         self.interface = interface
37         self.interface._impl = self
38 
39         # Winforms close handling is caught on the FormClosing handler. To allow
40         # for async close handling, we need to be able to abort this close
41         # event, and then manually cause the close as part of the async result
42         # handling. However, this then causes an is_closing event, which we need
43         # to ignore. The `_is_closing` flag lets us easily identify if the
44         # window is in the process of closing.
45         self._is_closing = False
46 
47         self.native = WinForms.Form()
48         self.native.interface = self.interface
49         self.native.FormClosing += self.winforms_FormClosing
50 
51         self.set_title(title)
52         self.set_size(size)
53         self.set_position(position)
54 
55         self.toolbar_native = None
56         self.toolbar_items = None
57         if self.native.interface.resizeable:
58             self.native.Resize += self.winforms_resize
59         else:
60             self.native.FormBorderStyle = self.native.FormBorderStyle.FixedSingle
61             self.native.MaximizeBox = False
62 
63     def create_toolbar(self):
64         self.toolbar_native = WinForms.ToolStrip()
65         for cmd in self.interface.toolbar:
66             if cmd == GROUP_BREAK:
67                 item = WinForms.ToolStripSeparator()
68             elif cmd == SECTION_BREAK:
69                 item = WinForms.ToolStripSeparator()
70             else:
71                 if cmd.icon is not None:
72                     native_icon = cmd.icon._impl.native
73                     item = WinForms.ToolStripMenuItem(cmd.label, native_icon.ToBitmap())
74                 else:
75                     item = WinForms.ToolStripMenuItem(cmd.label)
76                 item.Click += cmd._impl.as_handler()
77                 cmd._impl.native.append(item)
78             self.toolbar_native.Items.Add(item)
79 
80     def get_position(self):
81         return (self.native.Location.X, self.native.Location.Y)
82 
83     def set_position(self, position):
84         self.native.Location = Point(*position)
85 
86     def get_size(self):
87         return (self.native.ClientSize.Width, self.native.ClientSize.Height)
88 
89     def set_size(self, size):
90         self.native.ClientSize = Size(*size)
91 
92     def set_app(self, app):
93         if app is None:
94             return
95         icon_impl = app.interface.icon._impl
96         if icon_impl is None:
97             return
98         self.native.Icon = icon_impl.native
99 
100     @property
101     def vertical_shift(self):
102         # vertical shift is the toolbar height or 0
103         result = 0
104         try:
105             result += self.native.interface._impl.toolbar_native.Height
106         except AttributeError:
107             pass
108         try:
109             result += self.native.interface._impl.native.MainMenuStrip.Height
110         except AttributeError:
111             pass
112         return result
113 
114     def set_content(self, widget):
115         if self.toolbar_native:
116             self.native.Controls.Add(self.toolbar_native)
117             # Create the lookup table of menu items,
118             # then force the creation of the menus.
119         self.native.Controls.Add(widget.native)
120 
121         # Set the widget's viewport to be based on the window's content.
122         widget.viewport = WinFormsViewport(native=self.native, frame=self)
123         widget.frame = self
124 
125         # Add all children to the content widget.
126         for child in widget.interface.children:
127             child._impl.container = widget
128 
129     def get_title(self):
130         return self.native.Text
131 
132     def set_title(self, title):
133         self.native.Text = title
134 
135     def show(self):
136         # The first render of the content will establish the
137         # minimum possible content size; use that to enforce
138         # a minimum window size.
139         TITLEBAR_HEIGHT = WinForms.SystemInformation.CaptionHeight
140         # Now that the content is visible, we can do our initial hinting,
141         # and use that as the basis for setting the minimum window size.
142         self.interface.content._impl.rehint()
143         self.interface.content.style.layout(
144             self.interface.content,
145             WinFormsViewport(native=None, frame=None),
146         )
147         self.native.MinimumSize = Size(
148             int(self.interface.content.layout.width),
149             int(self.interface.content.layout.height) + TITLEBAR_HEIGHT
150         )
151         self.interface.content.refresh()
152 
153         if self.interface is not self.interface.app._main_window:
154             self.native.Icon = self.interface.app.icon.bind(self.interface.factory).native
155             self.native.Show()
156 
157     def winforms_FormClosing(self, sender, event):
158         # If the app is exiting, or a manual close has been requested,
159         # don't get confirmation; just close.
160         if not self.interface.app._impl._is_exiting and not self._is_closing:
161             if not self.interface.closeable:
162                 # Closeability is implemented by shortcutting the close handler.
163                 event.Cancel = True
164             elif self.interface.on_close:
165                 # If there is an on_close event handler, process it;
166                 # but then cancel the close event. If the result of
167                 # on_close handling indicates the window should close,
168                 # then it will be manually triggered as part of that
169                 # result handling.
170                 self.interface.on_close(self)
171                 event.Cancel = True
172 
173     def set_full_screen(self, is_full_screen):
174         self.interface.factory.not_implemented('Window.set_full_screen()')
175 
176     def set_on_close(self, handler):
177         pass
178 
179     def close(self):
180         self._is_closing = True
181         self.native.Close()
182 
183     def winforms_resize(self, sender, args):
184         if self.interface.content:
185             # Re-layout the content
186             self.interface.content.refresh()
187
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/src/winforms/toga_winforms/window.py b/src/winforms/toga_winforms/window.py
--- a/src/winforms/toga_winforms/window.py
+++ b/src/winforms/toga_winforms/window.py
@@ -48,6 +48,8 @@
         self.native.interface = self.interface
         self.native.FormClosing += self.winforms_FormClosing
 
+        self.native.MinimizeBox = self.native.interface.minimizable
+
         self.set_title(title)
         self.set_size(size)
         self.set_position(position)

{"golden_diff": "diff --git a/src/winforms/toga_winforms/window.py b/src/winforms/toga_winforms/window.py\n--- a/src/winforms/toga_winforms/window.py\n+++ b/src/winforms/toga_winforms/window.py\n@@ -48,6 +48,8 @@\n         self.native.interface = self.interface\n         self.native.FormClosing += self.winforms_FormClosing\n \n+        self.native.MinimizeBox = self.native.interface.minimizable\n+\n         self.set_title(title)\n         self.set_size(size)\n         self.set_position(position)\n", "issue": "Window is always resizable, minimizable and closeable on windows\n**Describe the bug**\r\nWindow seems to ignore `resizable`, `minimizable` and `closeable` args on OS Windows: if they're set to `False`, window still can be resized, minimized and closed.\r\n\r\n**To Reproduce**\r\nSteps to reproduce the behavior:\r\n1. Pass `minimizable=False`, `resizable=False` and `closeable=False` to `Window.__init__`.\r\n2. Resize it, minimize it, close it.\r\n\r\n**Expected behavior**\r\nWindow should keep its size, and all of titlebar buttons should be hidden (minimize and close due to corresponding args, and fullscreen due to resizable).\r\n\r\n**Simple example**\r\n```python\r\nimport toga\r\n\r\n\r\nclass App(toga.App):\r\n    def open_window(self, widget: toga.Widget):\r\n        # resizable, minimizable and closeable are False\r\n        window = toga.Window(\r\n            \"window id\", \"window title\", size=(320, 240), resizeable=False, minimizable=False, closeable=False\r\n        )\r\n        window.content = toga.Box()\r\n        self.windows += window\r\n        window.show()\r\n\r\n    def startup(self):\r\n        # resizable and minimizable are False\r\n        self.main_window = toga.MainWindow(\r\n            title=self.formal_name, factory=self.factory, resizeable=False, minimizable=False\r\n        )\r\n\r\n        box = toga.Box()\r\n        btn = toga.Button(\"Open second window\", on_press=self.open_window)\r\n        box.add(btn)\r\n        self.main_window.content = box\r\n\r\n        self.main_window.show()\r\n\r\n\r\ndef main():\r\n    App(\"testing\", \"testing\").main_loop()\r\n\r\n\r\nif __name__ == \"__main__\":\r\n    main()\r\n\r\n```\r\n\r\n**Screenshots**\r\n![resizing](https://user-images.githubusercontent.com/2825638/152692206-4b1f3a1b-0945-4895-a71b-31c379e26fe6.gif)\r\n\r\n\r\n**Environment:**\r\n - Operating System: Windows 10\r\n - Python version: 3.10.1\r\n - Software versions:\r\n   - Toga: 0.3.0.dev30\n", "before_files": [{"content": "from toga import GROUP_BREAK, SECTION_BREAK\n\nfrom .libs import Point, Size, WinForms\n\n\nclass WinFormsViewport:\n    def __init__(self, native, frame):\n        self.native = native\n        self.frame = frame\n        self.baseline_dpi = 96\n\n    @property\n    def width(self):\n        # Treat `native=None` as a 0x0 viewport\n        if self.native is None:\n            return 0\n        return self.native.ClientSize.Width\n\n    @property\n    def height(self):\n        if self.native is None:\n            return 0\n        # Subtract any vertical shift of the frame. This is to allow\n        # for toolbars, or any other viewport-level decoration.\n        return self.native.ClientSize.Height - self.frame.vertical_shift\n\n    @property\n    def dpi(self):\n        if self.native is None:\n            return self.baseline_dpi\n        return self.native.CreateGraphics().DpiX\n\n\nclass Window:\n    def __init__(self, interface, title, position, size):\n        self.interface = interface\n        self.interface._impl = self\n\n        # Winforms close handling is caught on the FormClosing handler. To allow\n        # for async close handling, we need to be able to abort this close\n        # event, and then manually cause the close as part of the async result\n        # handling. However, this then causes an is_closing event, which we need\n        # to ignore. The `_is_closing` flag lets us easily identify if the\n        # window is in the process of closing.\n        self._is_closing = False\n\n        self.native = WinForms.Form()\n        self.native.interface = self.interface\n        self.native.FormClosing += self.winforms_FormClosing\n\n        self.set_title(title)\n        self.set_size(size)\n        self.set_position(position)\n\n        self.toolbar_native = None\n        self.toolbar_items = None\n        if self.native.interface.resizeable:\n            self.native.Resize += self.winforms_resize\n        else:\n            self.native.FormBorderStyle = self.native.FormBorderStyle.FixedSingle\n            self.native.MaximizeBox = False\n\n    def create_toolbar(self):\n        self.toolbar_native = WinForms.ToolStrip()\n        for cmd in self.interface.toolbar:\n            if cmd == GROUP_BREAK:\n                item = WinForms.ToolStripSeparator()\n            elif cmd == SECTION_BREAK:\n                item = WinForms.ToolStripSeparator()\n            else:\n                if cmd.icon is not None:\n                    native_icon = cmd.icon._impl.native\n                    item = WinForms.ToolStripMenuItem(cmd.label, native_icon.ToBitmap())\n                else:\n                    item = WinForms.ToolStripMenuItem(cmd.label)\n                item.Click += cmd._impl.as_handler()\n                cmd._impl.native.append(item)\n            self.toolbar_native.Items.Add(item)\n\n    def get_position(self):\n        return (self.native.Location.X, self.native.Location.Y)\n\n    def set_position(self, position):\n        self.native.Location = Point(*position)\n\n    def get_size(self):\n        return (self.native.ClientSize.Width, self.native.ClientSize.Height)\n\n    def set_size(self, size):\n        self.native.ClientSize = Size(*size)\n\n    def set_app(self, app):\n        if app is None:\n            return\n        icon_impl = app.interface.icon._impl\n        if icon_impl is None:\n            return\n        self.native.Icon = icon_impl.native\n\n    @property\n    def vertical_shift(self):\n        # vertical shift is the toolbar height or 0\n        result = 0\n        try:\n            result += self.native.interface._impl.toolbar_native.Height\n        except AttributeError:\n            pass\n        try:\n            result += self.native.interface._impl.native.MainMenuStrip.Height\n        except AttributeError:\n            pass\n        return result\n\n    def set_content(self, widget):\n        if self.toolbar_native:\n            self.native.Controls.Add(self.toolbar_native)\n            # Create the lookup table of menu items,\n            # then force the creation of the menus.\n        self.native.Controls.Add(widget.native)\n\n        # Set the widget's viewport to be based on the window's content.\n        widget.viewport = WinFormsViewport(native=self.native, frame=self)\n        widget.frame = self\n\n        # Add all children to the content widget.\n        for child in widget.interface.children:\n            child._impl.container = widget\n\n    def get_title(self):\n        return self.native.Text\n\n    def set_title(self, title):\n        self.native.Text = title\n\n    def show(self):\n        # The first render of the content will establish the\n        # minimum possible content size; use that to enforce\n        # a minimum window size.\n        TITLEBAR_HEIGHT = WinForms.SystemInformation.CaptionHeight\n        # Now that the content is visible, we can do our initial hinting,\n        # and use that as the basis for setting the minimum window size.\n        self.interface.content._impl.rehint()\n        self.interface.content.style.layout(\n            self.interface.content,\n            WinFormsViewport(native=None, frame=None),\n        )\n        self.native.MinimumSize = Size(\n            int(self.interface.content.layout.width),\n            int(self.interface.content.layout.height) + TITLEBAR_HEIGHT\n        )\n        self.interface.content.refresh()\n\n        if self.interface is not self.interface.app._main_window:\n            self.native.Icon = self.interface.app.icon.bind(self.interface.factory).native\n            self.native.Show()\n\n    def winforms_FormClosing(self, sender, event):\n        # If the app is exiting, or a manual close has been requested,\n        # don't get confirmation; just close.\n        if not self.interface.app._impl._is_exiting and not self._is_closing:\n            if not self.interface.closeable:\n                # Closeability is implemented by shortcutting the close handler.\n                event.Cancel = True\n            elif self.interface.on_close:\n                # If there is an on_close event handler, process it;\n                # but then cancel the close event. If the result of\n                # on_close handling indicates the window should close,\n                # then it will be manually triggered as part of that\n                # result handling.\n                self.interface.on_close(self)\n                event.Cancel = True\n\n    def set_full_screen(self, is_full_screen):\n        self.interface.factory.not_implemented('Window.set_full_screen()')\n\n    def set_on_close(self, handler):\n        pass\n\n    def close(self):\n        self._is_closing = True\n        self.native.Close()\n\n    def winforms_resize(self, sender, args):\n        if self.interface.content:\n            # Re-layout the content\n            self.interface.content.refresh()\n", "path": "src/winforms/toga_winforms/window.py"}], "after_files": [{"content": "from toga import GROUP_BREAK, SECTION_BREAK\n\nfrom .libs import Point, Size, WinForms\n\n\nclass WinFormsViewport:\n    def __init__(self, native, frame):\n        self.native = native\n        self.frame = frame\n        self.baseline_dpi = 96\n\n    @property\n    def width(self):\n        # Treat `native=None` as a 0x0 viewport\n        if self.native is None:\n            return 0\n        return self.native.ClientSize.Width\n\n    @property\n    def height(self):\n        if self.native is None:\n            return 0\n        # Subtract any vertical shift of the frame. This is to allow\n        # for toolbars, or any other viewport-level decoration.\n        return self.native.ClientSize.Height - self.frame.vertical_shift\n\n    @property\n    def dpi(self):\n        if self.native is None:\n            return self.baseline_dpi\n        return self.native.CreateGraphics().DpiX\n\n\nclass Window:\n    def __init__(self, interface, title, position, size):\n        self.interface = interface\n        self.interface._impl = self\n\n        # Winforms close handling is caught on the FormClosing handler. To allow\n        # for async close handling, we need to be able to abort this close\n        # event, and then manually cause the close as part of the async result\n        # handling. However, this then causes an is_closing event, which we need\n        # to ignore. The `_is_closing` flag lets us easily identify if the\n        # window is in the process of closing.\n        self._is_closing = False\n\n        self.native = WinForms.Form()\n        self.native.interface = self.interface\n        self.native.FormClosing += self.winforms_FormClosing\n\n        self.native.MinimizeBox = self.native.interface.minimizable\n\n        self.set_title(title)\n        self.set_size(size)\n        self.set_position(position)\n\n        self.toolbar_native = None\n        self.toolbar_items = None\n        if self.native.interface.resizeable:\n            self.native.Resize += self.winforms_resize\n        else:\n            self.native.FormBorderStyle = self.native.FormBorderStyle.FixedSingle\n            self.native.MaximizeBox = False\n\n    def create_toolbar(self):\n        self.toolbar_native = WinForms.ToolStrip()\n        for cmd in self.interface.toolbar:\n            if cmd == GROUP_BREAK:\n                item = WinForms.ToolStripSeparator()\n            elif cmd == SECTION_BREAK:\n                item = WinForms.ToolStripSeparator()\n            else:\n                if cmd.icon is not None:\n                    native_icon = cmd.icon._impl.native\n                    item = WinForms.ToolStripMenuItem(cmd.label, native_icon.ToBitmap())\n                else:\n                    item = WinForms.ToolStripMenuItem(cmd.label)\n                item.Click += cmd._impl.as_handler()\n                cmd._impl.native.append(item)\n            self.toolbar_native.Items.Add(item)\n\n    def get_position(self):\n        return (self.native.Location.X, self.native.Location.Y)\n\n    def set_position(self, position):\n        self.native.Location = Point(*position)\n\n    def get_size(self):\n        return (self.native.ClientSize.Width, self.native.ClientSize.Height)\n\n    def set_size(self, size):\n        self.native.ClientSize = Size(*size)\n\n    def set_app(self, app):\n        if app is None:\n            return\n        icon_impl = app.interface.icon._impl\n        if icon_impl is None:\n            return\n        self.native.Icon = icon_impl.native\n\n    @property\n    def vertical_shift(self):\n        # vertical shift is the toolbar height or 0\n        result = 0\n        try:\n            result += self.native.interface._impl.toolbar_native.Height\n        except AttributeError:\n            pass\n        try:\n            result += self.native.interface._impl.native.MainMenuStrip.Height\n        except AttributeError:\n            pass\n        return result\n\n    def set_content(self, widget):\n        if self.toolbar_native:\n            self.native.Controls.Add(self.toolbar_native)\n            # Create the lookup table of menu items,\n            # then force the creation of the menus.\n        self.native.Controls.Add(widget.native)\n\n        # Set the widget's viewport to be based on the window's content.\n        widget.viewport = WinFormsViewport(native=self.native, frame=self)\n        widget.frame = self\n\n        # Add all children to the content widget.\n        for child in widget.interface.children:\n            child._impl.container = widget\n\n    def get_title(self):\n        return self.native.Text\n\n    def set_title(self, title):\n        self.native.Text = title\n\n    def show(self):\n        # The first render of the content will establish the\n        # minimum possible content size; use that to enforce\n        # a minimum window size.\n        TITLEBAR_HEIGHT = WinForms.SystemInformation.CaptionHeight\n        # Now that the content is visible, we can do our initial hinting,\n        # and use that as the basis for setting the minimum window size.\n        self.interface.content._impl.rehint()\n        self.interface.content.style.layout(\n            self.interface.content,\n            WinFormsViewport(native=None, frame=None),\n        )\n        self.native.MinimumSize = Size(\n            int(self.interface.content.layout.width),\n            int(self.interface.content.layout.height) + TITLEBAR_HEIGHT\n        )\n        self.interface.content.refresh()\n\n        if self.interface is not self.interface.app._main_window:\n            self.native.Icon = self.interface.app.icon.bind(self.interface.factory).native\n            self.native.Show()\n\n    def winforms_FormClosing(self, sender, event):\n        # If the app is exiting, or a manual close has been requested,\n        # don't get confirmation; just close.\n        if not self.interface.app._impl._is_exiting and not self._is_closing:\n            if not self.interface.closeable:\n                # Closeability is implemented by shortcutting the close handler.\n                event.Cancel = True\n            elif self.interface.on_close:\n                # If there is an on_close event handler, process it;\n                # but then cancel the close event. If the result of\n                # on_close handling indicates the window should close,\n                # then it will be manually triggered as part of that\n                # result handling.\n                self.interface.on_close(self)\n                event.Cancel = True\n\n    def set_full_screen(self, is_full_screen):\n        self.interface.factory.not_implemented('Window.set_full_screen()')\n\n    def set_on_close(self, handler):\n        pass\n\n    def close(self):\n        self._is_closing = True\n        self.native.Close()\n\n    def winforms_resize(self, sender, args):\n        if self.interface.content:\n            # Re-layout the content\n            self.interface.content.refresh()\n", "path": "src/winforms/toga_winforms/window.py"}]}