Window.Resize
-------------

Resizes the window animated.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [Window](component_Window.md) | [2.2](newinversion22.md) | ✅ Yes | ✅ Yes | ❌ No | ❌ No | ❌ No |

MBS( "Window.Resize"; WindowRef; Width; Height { ; NoAnimation; Duration } ) 

**MBS**( **"Window.Resize";** /\* Resizes the window animated. \*/  
**$WindowRef**; /\* Window Reference is the unique OS level window ID. You can obtain this by using the [Window.FindByTitle](WindowFindByTitle.md) or [Window.FindByIndex](WindowFindByIndex.md) functions. Pass zero to access the frontmost window.e.g. 0 \*/   
**$Width**; /\* The new width of the window.e.g. 300 \*/   
**$Height**; /\* The new height of the window.e.g. 200 \*/   
**$NoAnimation**; /\* Optional; Whether to avoid animation. Pass 1 to disable animation. Default is 0 to allow animation.e.g. 0 \*/   
**$Duration**) /\* Optional; The duration in seconds. Can be a value between 0.1 and 5.0.e.g. 0.5 \*/ 

### Parameters

| Parameter | Description | Example | Flags |
|---|---|---|---|
| WindowRef | Window Reference is the unique OS level window ID. You can obtain this by using the [Window.FindByTitle](WindowFindByTitle.md) or [Window.FindByIndex](WindowFindByIndex.md) functions. Pass zero to access the frontmost window. | 0 |  |
| Width | The new width of the window. | 300 |  |
| Height | The new height of the window. | 200 |  |
| NoAnimation | Whether to avoid animation. Pass 1 to disable animation. Default is 0 to allow animation. | 0 | Optional |
| Duration | The duration in seconds. Can be a value between 0.1 and 5.0. | 0.5 | Optional |

### Result

Returns OK on success.

### Description

Resizes the window animated.   
On macOS we use Apples functions for animated resizing. On Windows we have our own code. Please make sure on Windows that the window is not maximized as resizing a maximized window puts it in a mode where you can't manual resize it.  
### Examples

Resizes a window:

 MBS ("Window.Resize"; $WindowRef ; 300; 200)  
Resize main window on windows:

 MBS ("Window.Resize"; "FileMaker Pro Advanced"; 800; 600)  
### See also

- [Window.FindByIndex](WindowFindByIndex.md)
- [Window.FindByTitle](WindowFindByTitle.md)
- [Window.Resizable](WindowResizable.md)
- [Window.ResizeContentView](WindowResizeContentView.md)
- [Window.SetMaxHeight](WindowSetMaxHeight.md)
- [Window.SetMaxWidth](WindowSetMaxWidth.md)
- [Window.SetMinHeight](WindowSetMinHeight.md)
- [Window.SetMinWidth](WindowSetMinWidth.md)
- [Window.SetTitlebarAppearsTransparent](WindowSetTitlebarAppearsTransparent.md)

### Release notes

- **Version 11.2**
    - Deprecated [Window.ResizeContentView](https://www.mbsplugins.eu/WindowResizeContentView.shtml), [Window.GetTitlebarAppearsTransparent](https://www.mbsplugins.eu/WindowGetTitlebarAppearsTransparent.shtml) and [Window.SetTitlebarAppearsTransparent](https://www.mbsplugins.eu/WindowSetTitlebarAppearsTransparent.shtml) functions.

### Example Databases

- [Window/Resize Window Animated](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/Window/Resize%20Window%20Animated.shtml#1GroupButton78.0000000378.000000097.0000000469.0000000LayoutObjectAnchor_)

### Blog Entries

- [MBS Filemaker Plugin, version 2.7fc](https://www.mbsplugins.de/archive/2012-05-08/MBS_Filemaker_Plugin_version_2/monkeybreadsoftware_blog_filemaker)
- [MBS Filemaker Plugin 2.7 Release notes](https://www.mbsplugins.de/archive/2012-05-08/MBS_Filemaker_Plugin_27_Releas/monkeybreadsoftware_blog_filemaker)
- [MBS Filemaker Plugin, version 2.5pr3](https://www.mbsplugins.de/archive/2011-12-18/MBS_Filemaker_Plugin_version_2/monkeybreadsoftware_blog_filemaker)
- [MBS Filemaker Plugin, version 2.2pr4](https://www.mbsplugins.de/archive/2010-11-15/MBS_Filemaker_Plugin_version_2/monkeybreadsoftware_blog_filemaker)

This function checks for a license.

Created 18th August 2014 , last changed 10th August 2020

  
[Window.Resizable](WindowResizable.md) - [Window.ResizeContentView](WindowResizeContentView.md)

[HTML Version](WindowResize.shtml)